prestashop

Creating a url rewrite module in prestashop

倖福魔咒の 提交于 2019-12-24 20:32:39
问题 I'm trying to build my own custom prestashop module. The module is very simple. It needs to read the url and if the url of the visitor is equal to an product code it needs to redirect the user to that specific product page. For this i'm using the following url: www.example.com/ean13/{ean13} So when the visitor, for example, tries to visit the page: www.example.com/ean13/1121312341 a query has to start running and has to search for that 'ean13' product code. If the product code exists the user

Db::Instance prestashop

二次信任 提交于 2019-12-24 17:32:59
问题 I added config.inc.php inside my php script in order to access to Db class provided. The problem is that when I launch the script from the server, it redicted to the website prestashop and then I can't see what I want to echo in the html page. More, I have made a error in order to see the behaviour: nothing is shown, he redirect to the prestashop website. Please help me. 回答1: SOLVED After lots of tests, the soloution is very easy. In order to use class from Prestashop service in my_own_file

Db::Instance prestashop

允我心安 提交于 2019-12-24 17:32:56
问题 I added config.inc.php inside my php script in order to access to Db class provided. The problem is that when I launch the script from the server, it redicted to the website prestashop and then I can't see what I want to echo in the html page. More, I have made a error in order to see the behaviour: nothing is shown, he redirect to the prestashop website. Please help me. 回答1: SOLVED After lots of tests, the soloution is very easy. In order to use class from Prestashop service in my_own_file

Prestashop filter products by category using WebService

心已入冬 提交于 2019-12-24 15:32:55
问题 I'm trying to use Prestashop WebService via PHP to filter products by categories but it seems that it's impossible. How to make it? Must be something like this array(‘resource’ =>’products’, ‘display’ => ‘[name]’, ‘filter[category]’ => ‘[x]'); 回答1: Which Prestashop version do you use ? I managed to get products for a specific category for v1.5.6.1 as follows: $webService = new PrestaShopWebservice( YOUR_SITE_URL, YOUR_API_KEY, false ); $opt = array( 'resource' => 'products', 'display' =>

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

How can I add a custom product “Sort by” field in prestashop?

◇◆丶佛笑我妖孽 提交于 2019-12-24 15:03:07
问题 I am new to Prestashop and I am trying to add a new "Sort by" field ( where by default you have: "Relevance" , "Name, A to Z" , "Name, Z to A", "Price, low to high", "Price, high to low" ) As you guys know, the functionality is located in the module called: "Ps_facetedsearch" , link here. I tried: Editing the module files, this works, but I can't upgrade the module anymore if I want to keep the functionality. Overriding, but can't seem to get it working, it still uses the same old module, not

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

Adding product type in prestashop add product page

你。 提交于 2019-12-24 10:38:57
问题 Iam new to prestashop ,iam trying to add new product type in addition to Standard product,Virtual product ,Pack of existing products Added this in informations.tpl file < div class="radio"> <label for="digital_product"> <input type="radio" name="type_product" id="digital_product" {if $is_in_pack}disabled="disabled"{/if} value="{Product::PTYPE_DIGITAL}" {if $product_type == Product::PTYPE_DIGITAL}checked="checked"{/if} > {l s='Digital product (services, booking, downloadable products, etc.)'}<

Prestashop: trying to decode password

笑着哭i 提交于 2019-12-24 09:49:31
问题 i'm developing a backend in Asp.NET for Prestashop. I've a small problem: can't decode password ! Here the code cmd.CommandText = "SELECT * FROM ps_employee WHERE email=@email AND passwd=MD5(@pwd) AND active=1" As you can see, i'm using MYSQL MD5 function, but ... it not work.. Password is correct, i'm sure... 回答1: The password hash is salted, prestashop seems to be using the value _COOKIE_KEY_ in settings.inc.php for this. You will have to look up this value and compute the md5 hash of it

Prestashop 1.6 - price saving issue.

六月ゝ 毕业季﹏ 提交于 2019-12-24 06:45:30
问题 In my Ecommerce site made in Prestashop version 1.6, when I update price of an item from administrative panel , it randomly gets affected. Sometimes the price change saved does not get implemented. The site is live and had been working so far but found this issue recently. 回答1: It's a bug of browsers: forge.prestashop.com This the post on the forum: PrestaShop forum This should be fix your problem: GitHub temporary fix The final fix (merged in the main project): GitHub full fix EDIT: A