prestashop

Get image url in prestashop

杀马特。学长 韩版系。学妹 提交于 2019-12-05 06:37:16
问题 I need to make a feed for my site for a comparing site. It has to be a sql statement. For now I have this: select pl.name as Titel, ROUND(p.price*1.21,2) as Price, replace(concat('http://', ifnull(conf.value,'domain/'), cl.name, '/', p.id_product, '-' , pl.name, '.html'),' ','-') as Link, concat('http://', ifnull(conf.value,'domain'), '/img/p/', p.id_product, '-' , pi.id_image, '.jpg') as "Image-location", cl.name as Categorie, p.id_product AS ID from dbrb_product p left join dbrb_image pi on

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

允我心安 提交于 2019-12-05 06:03:58
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. Find the following block in product-list.tpl : {foreach from=$products item=product name=products} Add this to display price without tax: {convertPrice price=$product.price_tax_exc} Make sure that during development Template compilation is set to

Prestashop 1.6 Create Module to Display Carrier Filter

╄→尐↘猪︶ㄣ 提交于 2019-12-04 19:15: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 module. Do take note that I already have an override in place for AdminOrdersController.php. I would like

How to clear all produts from cart in PrestaShop

无人久伴 提交于 2019-12-04 17:58:49
I am using PrestaShop version 1.5.4.1 Currently, my cart has separate delete buttons for each product. How can I remove all the products in one action? I just need to empty the cart in one click. I have used this code in ordercontroller and call the function from themes/defaulte/shoopin-cart.tpl public function emptybag() { $products = $this->getProducts(); foreach ($products as $product) { $this->deleteProduct($product->id); } } Many things : $this->getProducts() won't work in the order controler. Use get it with the context instead getProducts() method doesn't return product object, but a

Search products in a specific category

狂风中的少年 提交于 2019-12-04 15:04:46
I am trying to extend the default behaviour of the search mechanism provided by the default module blocksearch in Prestashop 1.6.0.6. I added to the default form a select input returning categories. Everything is working in both controller and view sides. The whole form is sending the correct parameter to the SearchController . But, in Model, I still don't know what are the changes to apply on Search.php entity so that the method find returns products that belong to the specified category. I spent a good time trying to understand how the search mechanism in find works but to no avail. Can

PRESTASHOP NGINX + REWRITE RULES

核能气质少年 提交于 2019-12-04 14:16:27
问题 I've being searching for a good solution for this combination and after following these: http://www.phamviet.net/2012/06/03/prestashop-rewrite-url-on-nginx/ Nginx configuration for Prestashop Prestashop 1.5.6.2 rewrite URLs over nginx install none of them seemed to work for me at all... so I started experimenting: After configuring SSL, CloudFlare, etc.... This is what I tried: server { listen 80; server_name mysuperdomain.com www.mysuperdomain.com; rewrite ^ https://$server_name$request_uri?

The right way to add a new field in admin product page in Prestashop 1.7

安稳与你 提交于 2019-12-04 13:07:57
问题 I've created a module for Prestashop 1.7 in order to add a new field in the Admin Product page. Due to the lack of proper documentation, I want to ask the proper way to add my custom field, a select. I want to get saved and updated on product save. I use the code below to add a tpl containing a form public function hookDisplayAdminProductsExtra($params) { $this->smarty; $available_items = $this->getAvailableBadges(); $id_product = Tools::getValue('id_product'); $this->context->smarty->assign(

Prestashop - Change order status when payment is validated

醉酒当歌 提交于 2019-12-04 09:48:33
When a payment is validated, the order status becomes "Payment validated" ("Paiement accepté" in french). I want to set another status when payment is validated, so the history would show the following : Current status : My personnal status History : My personnal status Payment validated To do so, I use the hook actionOrderStatusPostUpdate. This is my code : public function hookActionOrderStatusPostUpdate($aParams) { $oOrder = new Order($aParams['id_order']); if($aParams['newOrderStatus']->id == Configuration::get('PS_OS_PAYMENT')) { $oOrder->setCurrentState(Configuration::get('XXXXXX_STATUS

Magento or Prestashop, which is better? [closed]

让人想犯罪 __ 提交于 2019-12-04 07:33:46
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 8 years ago . I want to find an ecommerce solution for my little shop. My friend tells me that Prestashop is very easy to use and develop modules

where can I find prestashop controllers and how can i extend them?

依然范特西╮ 提交于 2019-12-04 06:03:19
问题 I am new to prestashop, so please bear with me if I am asking a very simple question. I am into creating module, and in my task I have to extend the cart controller that is being called by the ajaxcart.add() function in the javascript. I want to know, where is the controller that responds to this ajax request is located, and how can i extend this controller in my module. Are there any good documentation regarding this? thanks 回答1: I found a way to extending the prestashop default controllers