prestashop-1.6

How does prestashop loads Images?

喜夏-厌秋 提交于 2019-12-07 08:19:24
I have 2 prestashop stores hosted in the same ftp with the same products one of them have all the images loaded (Over 9k) and the other has none, I want to know from what controller and function does prestashop loads the images. I know the images are stored inside /img/p {digits with slashes}/product_id.jpg so the only thing I'm missing is the place where the images are loaded in the front end so I can alter that function and make it point to the photos of the other shop in order to avoid the job of uploading each of the photos on the second store. I have php knowledge so I'm looking for a way

ERR_TOO_MANY_REDIRECTS in backoffice when running Prestashop in Docker

梦想与她 提交于 2019-12-07 08:12:27
问题 I'm trying to make a docker environment for a Prestashop project. I have it almost working but for some reason, the back office is inaccessible - it gives me a ERR_TOO_MANY_REDIRECTS error. I changed the urls in shop_url table and changed PS_SHOP_DOMAIN and PS_SHOP_DOMAIN_SSL to no vain. I tried to disable friendly URLs, enable/disable SSL - but the problem persists. I'm using a custom image for a webserver: luken-wodby-nginx-prestashop Dockerfile: FROM wodby/nginx:1.10 ENV WODBY_DIR_FILES

How to display product price with and without tax at a time in product list for Prestashop?

牧云@^-^@ 提交于 2019-12-07 03:19:31
问题 In the product list I need to display the product price with and without tax at a time. I am using the version 1.6 of Prestashop. Right now the price including tax is displayed in the product list. I want to display the price excluding tax as well. How can I do that? I have searched for solution and was not able to find a working solution for me. 回答1: Find the following block in product-list.tpl : {foreach from=$products item=product name=products} Add this to display price without tax:

Create order with PrestaShop's API

*爱你&永不变心* 提交于 2019-12-06 16:37:36
I have a PrestaShop 1.6.0.9 and I'm trying to create a new order. I'm following the following steps: Create a cart with the security key of the client I have previously created, the id of the product I want to buy and the quantity. Then create a new order (sending a POST to /api/order ), passing the client id, the security key, the product id, the prices (with and without taxes), etc... This is the entire XML that I send: <?xml version="1.0" encoding="UTF-8"?><prestashop><order> <id_address_delivery>5</id_address_delivery> <id_address_invoice>5</id_address_invoice><id_currency>1</id_currency>

Prestashop 1.6 Create Module to Display Carrier Filter

自作多情 提交于 2019-12-06 12:31:45
问题 My Prestashop-based site is currently having an override for AdminOrdersController.php, I have placed it in override folder. From the link provided below, it is perfectly working fine to add a Carrier filter which is not available in Prestashop 1.6 now. I have tried the solution and it is working perfectly. Reference: Adding carrier filter in Orders page. Unfortunately, for production site, I have no access to core files and unable to implement as such. Thus, I will need to create a custom

Render helper form from prestashop admin controller

丶灬走出姿态 提交于 2019-12-06 11:50:45
问题 I am trying to add a helper form that lets the user upload images for two languages that the user can select. However I am stuck with the form and cannot render it in the view. Here is my controller code: <?php class AdminWineoHeaderImgController extends ModuleAdminController { public function __construct() { $this->bootstrap = true; $this->lang = (!isset($this->context->cookie) || !is_object($this->context->cookie)) ? intval(Configuration::get('PS_LANG_DEFAULT')) : intval($this->context-

Prestashop 1.6 custom module not displaying up on front end

て烟熏妆下的殇ゞ 提交于 2019-12-06 11:20:15
问题 My module is not displaying on the frontend , I was following this link doc.prestashop.com/display/PS15/Creating+a+PrestaShop+module to create a custom module in prestashop 1.6.I've checked the position , cleared and disabled the cache , uninstalled and reinstalled the module but nothing worked so far . p.s the config.xml was generated automatically. here is my mymodule.php code <?php if (!defined('_PS_VERSION_')) exit; class MyModule extends Module { public function __construct() { $this-

How to change content of order confirmation email template in prestashop?

天大地大妈咪最大 提交于 2019-12-06 09:29:07
问题 I want to change the content of order confirmation email template, only if a particular product has ordered. Is there any solution? 回答1: You can find the general template of email order confirmation in mails/language/order_conf.(html/txt). The product list template in mails/languages/order_conf_product_list.(tpl/txt) Called in classes/PaymentModule.php, validateOrder() function if you want to add variables. 来源: https://stackoverflow.com/questions/32367989/how-to-change-content-of-order

Custom page in Prestashop 1.6 without CMS

吃可爱长大的小学妹 提交于 2019-12-06 04:45:02
问题 I'm currently creating a customized page based on Bootstrap so I cannot pass through the CMS. I created a file Mypage.php that I put at the Prestahop root containing this code : <?php require(dirname(__FILE__).'/config/config.inc.php'); ControllerFactory::getController('MypageController')->run(); ?> Then I created a controller MypageController.php containing this code in override/controllers/front : class MypageControllerCore extends FrontController { public $php_self = 'Mypage.php'; public

Where to register global smarty modifier in PrestaShop?

安稳与你 提交于 2019-12-06 02:49:42
I'm creating a store based on PrestaShop (v 1.6), and I want to register my custom modifier plugin to be accessible from any templates (includinf front and back-officetemplates). The question is where to place the registration code? Now I use a Tools class override to add function to handle modifier (that is acceptable practice in case of store-specific functionality, afaik), and smarty.config.inc.php to register plugin (because all PrestaShop plugins are registereg here), but this file contains a warning about "not to modify file directly" and, as far as I understand, will be overwritten when