prestashop-1.6

How to get the discount amount code of voucher applied in prestashop

ぃ、小莉子 提交于 2020-01-17 18:38:08
问题 I am attaching the below snapshots of prestashop shopping cart So how I will get the code of discount amount from the voucher redeemed. http://imgur.com/a/bvx7J http://imgur.com/a/XgT9p 回答1: You can use the getCartRules() function to fetch all the cart rules applied on any cart. This function is defined in the Cart.php class file. You can use the following code to fetch all the coupon details on current cart: $this->context->cart->getCartRules(); and you can use below code to know if the

How to change meta title in prestashop module?

情到浓时终转凉″ 提交于 2020-01-07 09:26:35
问题 I'm using prestashop 1.6 and one module is not editable in SEO&URL, to change is meta. Actually, i have the default pretashop meta title. How can i add a custom header.tpl for this module ? Thank you for your help Tony 回答1: Assuming you are talking about a module with a controller, you can add in the base file /modules/mymodule/mymodule.php , inside the method __construct() , a object like this $this->controllers = array('controller_file_name'); , where the controller_file_name is the file

Prestashop 1.6 Product Showing wrong price combination when using specific price discount

和自甴很熟 提交于 2020-01-07 02:01:11
问题 How to repeat: install prestashop 1.6.1.4 create a product JEANS - Wholesale price 53.87, Retail price 74.82 (Allow orders When out of stock, No Tax) add specific price discount of 28% to JEANS add product combinations - in my case I want the client to choose a size and a color: Size - 29W x 30L, Color - Bleach Fade and Size - 29W x 30L, Color - Buff , both with a Wholesale price : 29.9, and Impact on price - Decrease 33.29 result: when I go to product page, if I choose the first combination

Prestashop saving invoices manually and automatically

风流意气都作罢 提交于 2020-01-05 04:21:10
问题 My invoices are saving to my server automatically when I press "view invoice" button from admin panel. The automatic saving works, but when I try to save invoice manually.. It will save it and when I open it.. I will have an blank(white) pdf page. I'm using two overrides to accomplysh automatic save PDF.php class PDF extends PDFCore { public function render($display = true) { if($this->template == PDF::TEMPLATE_INVOICE) parent::render('F', true); return parent::render($display); } }

How does prestashop loads Images?

人走茶凉 提交于 2020-01-03 01:42:51
问题 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

'Home' category page not working after update

非 Y 不嫁゛ 提交于 2019-12-31 02:54:05
问题 A prestashop website at version 1.4.1.4 was working with category.php file for category pages. The update to 1.6.0.6 unfortunatley deleted that file because it has been considered as deprecated. (URL structure changed after CMS update) One consequence is the change in the URL structure. from: url/category.php?id_category=6 to : url/index.php?id_category=6&controller=category&id_lang=2 So now, the first URL structure is giving 404. The question: We don't know why all the category pages are

Invalid configuration file

倾然丶 夕夏残阳落幕 提交于 2019-12-25 18:38:40
问题 I wanna install this theme theme but I get "Invalid configuration file" 回答1: Prestashop themes for import/autoinstallation should be packed by another way, zip file must contain: themes/your-theme-folder/ and Config.xml file where described which modules have to be enabled/disbaled etc. In your case solution is: Unpack zip into shop /themes/ folder. In backoffice Preferences -> Themes at the bottom Create new theme , set theme name and name of folder that was unpacked from zip in your case

PrestaShop: Translating overrided controller

梦想的初衷 提交于 2019-12-25 18:02:25
问题 I've created a module that overrides an AdminProductController.php and make a new bulk_action. <?php class AdminProductsController extends AdminProductsControllerCore { public function __construct() { parent::__construct(); $this->bulk_actions['setprice'] = array( 'text' => $this->l('Set a price for selected'), 'icon' => 'icon-price', ); } } Now I need to translate the action text and distribute that translation with module. The problem is that I don't see the original text inside modules

Prestashop 1.6 Webservice Order

 ̄綄美尐妖づ 提交于 2019-12-25 05:21:11
问题 I'm trying to finish my custom module to import clients, addresses, carts and orders from a webservice. Clients, Adresses and Carts imports works fine but when trying to insert new Order, it returns this error: This call to PrestaShop Web Services failed and returned an HTTP status of 500. That means: Internal Server Error. If i take a look to my apache2 error.log I can see this error: PHP Fatal error: Call to a member function validateOrder() on boolean in /var/www/html/prestashop_pool

Prestashop set multiple select from the module and get them in the input

大兔子大兔子 提交于 2019-12-25 04:53:15
问题 I am doing a small module in Prestashop. In that module I have used multiselect with helperform. So my code is like this array( 'type' => 'select', 'cols' => 8, 'class' => 'chosen-product-selct selected_products ', 'multiple' => true, 'label' => $this->l('Selected Products'), 'name' => 'selected_products[]', 'options' => array( 'query' => $product_query, 'id' => 'id', 'name' => 'product_name' ), 'desc' => $this->l('Select products from products list.'), ), Here I am saving those multiselected