prestashop-1.5

Undefined index (input text name) in Back office form customization (Prestashop)

假如想象 提交于 2020-07-22 08:21:58
问题 I'm creating a Prestashop 1.5 module, In the module Back office customization i got this error behind the input text Notice: Undefined index: name in /var/www/presta/cache/smarty/compile/7d2a4e588611a8a1dd049f82d14a4ae0b20fe990.file.form.tpl.php on line 228 line 228 is like this <?php $_smarty_tpl->tpl_vars['value_text'] = new Smarty_variable($_smarty_tpl->tpl_vars['fields_value']->value[$_smarty_tpl->tpl_vars['input']->value['name']], null, 0);?> It lookes like it's related with input text

Friendly URL problem in front module - Prestashop

扶醉桌前 提交于 2020-06-29 06:41:27
问题 I am building a front module for a website that is using 301 Moved Permanently option in SEO and URLs configuration. Wesbite uses Prestashop 1.6.1.9. In module, I am defining the route like this: public static $ModuleRoutes = array( 'module-aacategories-viewmapping-mapping' => array( 'controller' => 'viewmapping', 'rule' => 'mappings{/:tree}', 'keywords' => array( 'tree' => array('regexp' => '[/_a-zA-Z0-9-\pL]*', 'param' => 'tree'), ), 'params' => array( 'fc' => 'module', 'module' =>

'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

PrestaShop - How to retrieve Carrier ID in Smarty during the checkout process

本秂侑毒 提交于 2019-12-24 15:18:52
问题 I am using PrestaShop 1.5.3.1 and I want to retrieve the Carrier ID during the Payment step in the checkout process. In PrestaShop 1.4 I was using {$id_carrier} and it was working just fine, but it is not working in PrestaShop 1.5.x I want to show one payment method depending on selected carrier. For example: {if $id_carrier == 1} my content {/if} 回答1: On the payment page, you can retrieve the selected Carrier ID using the following Smarty variable: {$cart->id_carrier} This will work anywhere

Listing products with multiple categories in Prestashop 1.5

北战南征 提交于 2019-12-24 12:44:37
问题 I'm communicating with Prestashop 1.5 Web Services for listing products and its filters are simple enough for basic cases, but what about multiple categories: Can I get a list of products that belong to category 1 AND 2? Can I get a list of products that belong to category 1 OR 2? 回答1: For your information here is Prestashop 1.5 Filter management process in classes/webservice/WebserviceRequest : /** * get SQL retrieve Filter * * @param string $sqlId * @param string $filterValue * @param

Prestashop 1.5.6.2 shows wrong products in the category (FrontOffice)

戏子无情 提交于 2019-12-23 17:22:43
问题 I'm using prestashop 1.5.6 and make a bulk category and product operation into mysql via 3rd party libraries (which i was wrote). Everything fine till some of my products show in wrong category. For eg i have A product in A category; But when i go to the B category A product is also there. I think something wrong with my ps_category_product table with position column. I'm updating this table with code below; $sqlFirst = 'SELECT id_product, id_category_default, xml_id_product FROM ps_shop

Add product to PrestaShop 1.5 via Web Service

北城余情 提交于 2019-12-21 22:47:28
问题 I try to add a product via web service and I receive bellow error code: RETURN HTTP BODY <?xml version="1.0" encoding="UTF-8"?> <prestashop xmlns:xlink="http://www.w3.org/1999/xlink"> <errors> <error> <message><![CDATA[Internal error. To see this error please display the PHP errors.]]></message> </error> </errors> </prestashop> I am searching 2 days but nothing. Please can anyone help me? My Code is below. define('DEBUG', true); define('_PS_DEBUG_SQL_', true); define('PS_SHOP_PATH', 'http:/

RESTomancy: Getting products from category in Prestashop 1.5

纵饮孤独 提交于 2019-12-13 02:17:00
问题 Disclaimers: This is oriented towards Prestashop 1.5 but if the answer is: " this is fixed in version 1.x " then I'll raise a petition to update our shop . I'm also tagging it as REST because I think I explained it throughly enough so you don't need actual experience with Prestashop to understand it. So in Prestashop we have this Web Services which lack support for use cases as simple as search by category . 1. Let's say you want to get all the products from categories 1, 3 and 17: So what is

Product::getProductsProperties(): 'id_image' returns 'en_default', not image

倖福魔咒の 提交于 2019-12-12 02:45:29
问题 I've build a module to make a custom page with some products. I've tried to //get all products $products_partial = Product::getProducts($this->context->language->id, 0, 1000, 'name', 'asc'); $products = Product::getProductsProperties($this->context->language->id, $products_partial); foreach ($products as $product) { //here comes some logic to select some products (not relevant for this question) //echo the image ID $results[] = $product; } $this->context->smarty->assign(array( 'products' =>

Prestashop and null fields in DB

非 Y 不嫁゛ 提交于 2019-12-10 23:41:30
问题 I have a very simple piece of code : $dropOrder = new DropOrder($dropOrderId); $dropOrder->is_supplier_paid = $payValue; $dropOrder->save(); It works and saves a 'is_supplier_paid' field value into the database. But it also does unexpected actions and fills all null valued fields with 0 values. I try to save it like this : $dropOrder->save(true); But I still have the same strange behavior. I want to change one field only and don't touch the other ones. 回答1: Values are formated by ObjectModel: