prestashop

Path Problem with Custom Prestashop module

你离开我真会死。 提交于 2020-01-25 10:35:12
问题 Can someone help me with a file path problem I am experiencing with a custom Prestashop module 1.6 version? The following works perfectly in a localhost environment: return $this->display(__FILE__, '../../product-list.tpl'); however does not work on a live server. The following does work: return $this->display(__FILE__, '../../themes/default-bootstrap/product-list.tpl'); which is not acceptable as some customers will not be using the default-bootstrap theme. Any assistance with this problem

Add product to basket via Javascript (jQuery) in Prestashop 1.7.5.0

懵懂的女人 提交于 2020-01-24 22:45:08
问题 I'm creating a theme for prestashop 1.7 and I try to create an ajax call from javascript (jQuery) that adds the product with a specific name to the shoppingbasket. (I read through documentation, looked at modules, googled for hours, but no luck). So basically: <button id="buyProduct" data-productname="myProduct">Buy Product</button> $('#buyProduct).click(function(){ var productname = $(this).data('productname'); // Do Prestashop Magic }); 回答1: Add products by name is bad idea. You need id

PrestaShop $link -> getProductLink($product) gives incorrect URL

泪湿孤枕 提交于 2020-01-24 13:01:45
问题 I'm generating my product links in custom ajax powered module with $link -> getProductLink($product) it's generating a URL like http://example.com/prestashop/2-blouse.html which is throwing an error saying [Debug] This page has moved Please use the following URL instead: http://example.com/prestashop/blouses/2-blouse.html How do I avoid the same Thanks P.S: I'm using prestashop 1.6 回答1: Set _PS_MODE_DEV_ to false in config/defines.inc.php . 回答2: In Preferences > SEO & URLs set disable

Updating theme.yml in PrestaShop

∥☆過路亽.° 提交于 2020-01-23 11:44:31
问题 So I'm trying to modify the layout of theme.yml in a PrestaShop theme. I comment out the following: hooks: modules_to_hook: displayFooter: # - ps_linklist # - ps_customeraccountlinks - ps_contactinfo And then I save and FTP the file. The FTP succeeds. However, the linklist and customeraccountlinks hooks are still displayed in the footer on client browsers. I've tried to force refresh on the client browser, also to clear cache in back office. Neither of these work. How do I propagate this

Import XML products to Prestashop in PHP

╄→尐↘猪︶ㄣ 提交于 2020-01-22 03:06:14
问题 I need create a PHP file to import a lot of products from a external source (a distributor) to my Prestashop 1.7.6. I need to connect with this service "http://www.ferrunion.com/ita/codice/id_service.php" to take the token and when I recive this string I need to connect with this service "http://www.ferrunion.com/ita/codice/catalogo_service.php" to recive the XML file. This is an example of the structure of the XML: <![CDATA[ <product> <id>id<id> <description>description</description>

Import XML products to Prestashop in PHP

£可爱£侵袭症+ 提交于 2020-01-22 03:06:05
问题 I need create a PHP file to import a lot of products from a external source (a distributor) to my Prestashop 1.7.6. I need to connect with this service "http://www.ferrunion.com/ita/codice/id_service.php" to take the token and when I recive this string I need to connect with this service "http://www.ferrunion.com/ita/codice/catalogo_service.php" to recive the XML file. This is an example of the structure of the XML: <![CDATA[ <product> <id>id<id> <description>description</description>

Prestashop with smarty_internal_templatebase

限于喜欢 提交于 2020-01-17 07:47:06
问题 PrestaShop 1.6.1.10 PHP 5.5.7 When I turn on debugging in PrestaShop, appear as errors like this, I would fix it, but I do not understand how to fix it. Notice: Undefined index: br in public_html/tools/smarty/sysplugins/smarty_internal_templatebase.php(157) : eval()'d code on line 34 Notice: Trying to get property of non-object in public_html/tools/smarty/sysplugins/smarty_internal_templatebase.php(157) : eval()'d code on line 34 Notice: Undefined index: hookPaymentShow in public_html/tools

Prestashop with smarty_internal_templatebase

非 Y 不嫁゛ 提交于 2020-01-17 07:47:01
问题 PrestaShop 1.6.1.10 PHP 5.5.7 When I turn on debugging in PrestaShop, appear as errors like this, I would fix it, but I do not understand how to fix it. Notice: Undefined index: br in public_html/tools/smarty/sysplugins/smarty_internal_templatebase.php(157) : eval()'d code on line 34 Notice: Trying to get property of non-object in public_html/tools/smarty/sysplugins/smarty_internal_templatebase.php(157) : eval()'d code on line 34 Notice: Undefined index: hookPaymentShow in public_html/tools

Reconfiguring PHP Mail() Smarty Contact Form

筅森魡賤 提交于 2020-01-11 12:48:12
问题 I'm using Prestashop as my ecommerce shopping cart and CMS solution and was having problems receiving emails sent via the contact form. I asked around and found the problem to be due to the fact that I need to assign the 'from' address as something from my domain (e.g. do_not_reply@mydomain.com) and the email entered by user to be assigned a different variable (e.g. 'replyemail'). However, the Prestashop contact form is created with a PHP Smarty template engine, which has separate contact

Access Prestashop webservice from JavaScript

久未见 提交于 2020-01-10 09:22:46
问题 In the Prestashop backend I activated the webservice and I created an authentication key. Testing in browser works well but now I want to access the webservice via JavaScript in a Cordova application. The response I am getting is 401 (Unauthorized) . I'm performing this ajax call (using AngularJS): $http.get('http://AUTHENTICATION_KEY@url.com/api/employees/2', {}) How do I have to send the authentication key? I've been searching on the Internet but I did not found anything interesting that