Category: PrestaShop Tutorials (page 11 of 14)

How to get order details by id in PrestaShop 1.7

In this post I am going to explain how to get order details by id in PrestaShop 1.7. // Your order id $id_order = 5; // Load order object $order = new Order((int) $id_order); // Validate customer object if (Validate::isLoadedObject($order)) { // Get Order Payment Method Name echo $order->payment; // Get Order Date echo $order->date_add;…

PrestaShop 1.7 – How to get customer details by id

In this post I am going to explain how to get customer details by id in PrestaShop 1.7. // Your customer id $id_customer = 4; // Load customer object $customer = new Customer((int) $id_customer); // Validate customer object if (Validate::isLoadedObject($customer)) { // Get Customer First Name echo $customer->firstname; // Get Customer Last Name echo $customer->lastname;…

Prestashop 1.7 – How to get product details by id

In this post I am going to explain how to get product details by id in PrestaShop 1.7. // Your product id $id_product = 10; // Language id $lang_id = (int) Configuration::get(‘PS_LANG_DEFAULT’); // Load product object $product = new Product($id_product, false, $lang_id); // Validate product object if (Validate::isLoadedObject($product)) { // Get product name echo $product->name;…

How to get current customer group id in PrestaShop 1.7?

In this post I am going to explain how to get current customer group id in PrestaShop 1.7. 1) Inside module or controller file (php) if ($this->context->customer->isLogged()) { $customerGroupId = $this->context->customer->id_default_group; echo $customerGroupId . “<br>”; // Do something here } else { // Do something here } 2) Inside template file (tpl) {if $customer.is_logged} {$customer.id_default_group}…

Prestashop 1.7 – Get current logged in customer details

In this post I am going to explain how to get current logged in customer details in PrestaShop 1.7. 1) Inside module or controller file (php) if ($this->context->customer->isLogged()) { $customerId = $this->context->customer->id; $firstname = $this->context->customer->firstname; $lastname = $this->context->customer->lastname; $email = $this->context->customer->email; echo $customerId . “<br>”; echo $firstname . “<br>”; echo $lastname . “<br>”; echo $email…

How to check if customer is logged in or not in PrestaShop 1.7?

In this post I am going to explain how to check customer is logged in or not in PrestaShop 1.7. 1) Inside module or controller file (php) if ($this->context->customer->isLogged()) { echo “Logged In”; // Do something here } else { echo “Not Logged In”; // Do something here } 2) Inside template file (tpl) {if…

How to show cover image of your product with combination in PrestaShop 1.7?

In e-Commerce business, Product image is a vital aspect, to attract a visitor’s eye in the first place. In PrestaShop 1.7, If you have combination product then PrestaShop shows image of the one selected by default in product combination instead of the generic (Cover) image of your product. Do you want to show generic (Cover)…

How to Add Facebook Page Widget in PrestaShop

Putting your social profiles on your website is a must these days and having a Facebook like page will help your website visitors engage with you on your Facebook page as well. Facebook page widget allows you to show content from any public Facebook page. If you run a business page on Facebook you can…

How to Change Position of Modules in PrestaShop 1.7?

In order to change the position of module, please read below steps. 1. Go to Back-office > Design > Positions: On the position page you will find the list of module in each hooks. 2. Now, Just drag and drop or use up and down arrows to change position within a hook. Changes will be…

How To Add New Employees and Setup Permissions in PrestaShop 1.7?

As the shop owner, to make management process easier, this is something that you have to do. You can create individual accounts to allow right kind of access to every employee. To add new employees and set up permissions, Follow the below guide: Go to: Back-office > Advanced Parameters > Team. This page will show…

Older posts Newer posts