Page 44 of 68

How to get sub-categories from parent category id in PrestaShop 1.7

In this post I am going to explain how to get sub-categories from parent category id in PrestaShop 1.7.   // Your Product id $id_parent_category = 3; // Fetch parent category $categoryObj = new Category($id_parent_category); // Validate category object if (Validate::isLoadedObject($categoryObj)) { $categoryList = $categoryObj->getSubCategories($this->context->language->id); if ($categoryList && count($categoryList) > 0) { foreach ($categoryList AS…

How to add remote javascript & stylesheet in PrestaShop 1.7

In this post I am going to explain how to add remote javascript & stylesheet in PrestaShop 1.7. In PrestaShop 1.7+, it’s easy to register custom assets on each pages. The major improvement is that you can easily manage them from your theme, without any modules. Lets see how to registering & unregistering javascript as…

How to include Google adsense code at footer in PrestaShop 1.7

How to include google adsense code at footer in prestashop 1.7 In this post I am going to explain how to include google adsense code at footer in prestashop 1.7 In order to add your google adsense code at footer, please open the below files from your current template/theme. For example classic template footer.tpl file…

How to add live chat code in PrestaShop 1.7?

In this post I am going to explain how to add live chat code in prestashop 1.7. In order to add your live chat code at footer, please open the below files from your current template/theme. For example classic template footer.tpl file path. [PrestaShop Root Directory]/themes/classic/templates/_partials/footer.tpl Please check your template name and find the footer.tpl…

How to display date with different format in PrestaShop 1.7

In this post I am going to explain how how to display date with different format in Prestashop 1.7. In order to display a date in your .tpl file, you can use the smarty.now function. Here are some common examples: {$smarty.now|date_format:”%b %e %Y”} Result: Oct 19 2019 {$smarty.now|date_format:”%D”} Result: 10/19/19 {$smarty.now|date_format:”%A, %e %B %Y”} Result:…

How to get full sub-categories tree from root category id in PrestaShop 1.7

In this post I am going to explain how to get full sub-categories tree from root category id in PrestaShop 1.7. // Set your root category id $root_category_id = 2; // Set language id $language_id = $this->context->language->id; // Get category tree for given root category $category_tree = Category::getNestedCategories($root_category_id, $language_id); // Print category array and find…

How to Enable Single Store Mode in Magento 2

Single-Store Mode is disabled as default in Magento. Enable single-store mode to turning off all Store View options in Magento 2. In this article we’ll show you, how to Enable Single Store Mode in Magento 2. Follow this simple guideline… Step 1: Get Started Login into Magento Admin Panel and from sidebar go to, Store…

How to Configure the Default Pages in Magento 2

In this article we’ll show you, how to Configure the Default Pages in Magento 2. Follow this simple guideline… Step 1: Get Started Login into Magento Admin Panel and from sidebar go to, Store > Settings > Configuration. Step 2: Configure the Default Pages From Left hand side menu select Web > Default Pages Then…

How to Setup Store Information in Magento 2

In this article we’ll show you, how to setup store information in Magento 2. Follow this simple guideline… Step 1: Get Started Login into Magento Admin Panel and from sidebar go to, Store > Settings > Configuration. Step 2: Setup Store Information From Left hand side menu select General > Store Information Then Expand Store…

How to Change Weight Unit in Magento 2

In this article we’ll show you, how to change Weight Unit in Magento 2. Follow this simple guideline… Step 1: Get Started Login into Magento Admin Panel and from sidebar go to, Store > Settings > Configuration. Step 2: Change Weight Unit From Left hand side menu select General > Locale Options Then Expand Locale…

« Older posts Newer posts »