opencart-3

OpenCart .twig file not showing changes

我们两清 提交于 2021-02-10 22:04:36
问题 I've been trying to change the product/catalog.twig file, to remove some unnecessary buttons such as the "add to wishlist" and "compare product" options, which are just useless for the store I'm attempting to make. On the theme editor, I've removed the two buttons from the .twig file, yet the changes aren't showing on the store. I've heard it might be an issue with caching, like it's bringing up the old site. So I deleted the cache from the storage folder, yet the problem still persists. 回答1:

How to setup a custom cron job in opencart?

放肆的年华 提交于 2021-01-29 10:55:12
问题 Can anyone tell me how can I setup a custom cron job in opencart ? I have Url in below format and when I am manually hit this url it works perfectly now I want to make it dynamic on cron schedule basis. I have setup cron job in https://cron-job.org/en/ using below URL and it works fine but I'm not sure whether it is the right way or not? > http://www.yourstore.com/admin/index_for_cron.php?route=module/modulename/function Thanks in advance..! 回答1: There you'll find instruction: http://docs

How to display images of categories on the product page to which it belongs Opencart 3

给你一囗甜甜゛ 提交于 2020-08-08 09:35:58
问题 Please tell me how to display images of the categories to which the product belongs on the product page. I brought out the name and link to the categories, but with the image it does not work. I can't understand what and where to insert to display category images. I did this (in OCMOD file): <file path="catalog/controller/product/product.php"> <operation error="log"> <search><![CDATA[$product_info = $this->model_catalog_product->getProduct($product_id);]]></search> <add position="after" index

How to display images of categories on the product page to which it belongs Opencart 3

杀马特。学长 韩版系。学妹 提交于 2020-08-08 09:35:19
问题 Please tell me how to display images of the categories to which the product belongs on the product page. I brought out the name and link to the categories, but with the image it does not work. I can't understand what and where to insert to display category images. I did this (in OCMOD file): <file path="catalog/controller/product/product.php"> <operation error="log"> <search><![CDATA[$product_info = $this->model_catalog_product->getProduct($product_id);]]></search> <add position="after" index

How to set language through url in opencart

倾然丶 夕夏残阳落幕 提交于 2020-06-24 08:58:25
问题 I'd like to change language through url so my site can appear in different languages in search engines. e.g: I'd like the user to change language through a link like this: www.mysite.com/lang=ar I'm using opencart 3.0.2 Currently the user change through a form menu that submit post request, so search engine can't index the other languages. How can I do that? 回答1: I successfully applied these steps: 1- open catalog/controller/startup/startup.php after the line: $languages = $this->model

How to set language through url in opencart

雨燕双飞 提交于 2020-06-24 08:58:04
问题 I'd like to change language through url so my site can appear in different languages in search engines. e.g: I'd like the user to change language through a link like this: www.mysite.com/lang=ar I'm using opencart 3.0.2 Currently the user change through a form menu that submit post request, so search engine can't index the other languages. How can I do that? 回答1: I successfully applied these steps: 1- open catalog/controller/startup/startup.php after the line: $languages = $this->model

OpenCart: I want to change something related to product attributes in the product details. I made changes in controller but its not reflecting

青春壹個敷衍的年華 提交于 2020-06-08 13:51:20
问题 I want to change something related to product attributes in the product details page: /index.php?route=product/product&product_id=100 So I changed \catalog\controller\product\product.php file and saved it. but it's not reflecting my changes even I removed the cache and refreshed the page but it's not working. Even I removed the whole code in the PHP file. But it's not reflecting my changes 回答1: If you are using OpenCart 3 - it might be ocmod cache or twig cache. To clear twig cache in your

Opencart 3.x category id in product page

a 夏天 提交于 2020-01-24 01:57:06
问题 I'm using opencart 3.0.2.0 I'm trying to get category id in the product page. Any suggestions ? 回答1: If you just want to get category id in the product page Open product.php file from catalog/controller/product and search for $product_info = $this->model_catalog_product->getProduct($product_id); replace it with $product_info = $this->model_catalog_product->getProduct($product_id); $query_categories = $this->model_catalog_product->getCategories($product_id); $categories = array(); foreach (

Opencart 3.0 — Display All Products from Category by ID on Category Page

一曲冷凌霜 提交于 2020-01-22 02:34:10
问题 I switched over to Opencart 3.0.. Not to fond of the .tpl to .twig changes. Anyways, I have been trying, to no avail, to display all products from a particular category on another category page. I found this foreach loop: {% for product in products %} Which I imagine reads <?php foreach ($products as $product) { //do something } ?> I tried adding the Loop to the path: catalog/view/theme/*/template/product/category.twig but it only shows the products from the current category page id I am

Showing message Twig_Error_Loader in open cart

和自甴很熟 提交于 2020-01-06 03:41:09
问题 I am using open cart version 3. And I got the following message: Twig_Error_Loader in open cart after replacing theme files. Full error: Fatal error: Uncaught exception 'Twig_Error_Loader' with message 'Unable to find template "common/column_left.twig" (looked into: C:/xampp/htdocs/fast/catalog/view/theme).' in C:\xampp\htdocs\fast\system\library\template\Twig\Loader\Filesystem.php:215 Stack trace: #0 C:\xampp\htdocs\fast\system\library\template\Twig\Loader\Filesystem.php(139 Twig_Loader