Search the Community
Showing results for tags 'original price'.
-
Hello, I have Prestashop 1.6.1.10. I did a {$product|@var_dump} on the foreach loop of the product-list.tpl and I looked on the category page for each datas of the products listed. On those datas, there is the "orderprice" (pre-tax retail price on the back-office): ["orderprice"]=> string(9) "31.700000" When I look at the search page for the same products with the var_dump, there isn't the orderprice, how do I add this variable to the search page layout ? I always thought the search and category layout had the same variable. Where is the controller I need to modify? I couldn't find it. I know there is the price_without_reduction variable available on those pages but for some products, it isn't the same as the order price and the order price is what I need. Regards,
- 2 replies
-
- order price
- orderprice
- (and 5 more)
-
Bonjour à tous, J'essaie depuis un bon moment à afficher les remises et prix originaux dans le mail de confirmation de commande (ligne par ligne). Dans le fichier paymentmodule.php j'ai rajouté dans la boucle foreach ($order->product_list as $product) $price_hr = Product::getPriceWithoutReduct((int)$product['id_product'], false............. ou récupérer cette variable avec $order_detail->product_price En vain, dans les deux cas, j'arrive juste à obtenir le dernier prix orginal de ma liste de produit, lequel se reporte à chaque ligne du tableau. Quelque chose qui m'échappe dans cette boucle, pourtant les références et / ou prix remisés sont bien affichés ligne par ligne. Si une âme charitable pouvait m'éclairer, D'avance merci Thierry
-
Hello Everyone, I am using the PS version 1.5.5. When we offer discount on the Home featured products, it just shows the new discounted price by default. I want to modify it and I need to show the original price(with a cut over it) as well as the discounted price on home featured products same as that on products page. I found a related topic here, http://www.prestashop.com/forums/topic/135636-adding-discount-price-to-home-featured-products/. Although it is mentioned in this topic on what is to be modified in the homefeatured.tpl file but no detailed mention on what is to be done in the css file. It would be great if someone could help me with this, I do not know any technical languages, created a store with the help of this community only . It might be very simple but I still need help. Thanks
- 17 replies
-
- home featured products
- original price
-
(and 1 more)
Tagged with:
-
Hi everybody, I'm starting using Prestashop, but I'm trying to do a thing without success. I would like to display in the products list and in the product details page two prices: one without a discount (the original price) and the discounted price. Is there a way to do so? Can you explain me how? Thankyou all very much! Gabriel
-
Hello all, Here I would like to share with you the way I decided to add a discount at every product in Prestashop versions 1.4.7.3 and 1.5.2 . I have tested this solution at these versions only but it might be similar for other versions.I have searched a bit but was not able to locate an existing solution to fit my needs (maybe I missed them). I feel that I have to share this since I have learned many things from this forum !! So for Version 1.5.2 Log in to your Back office (admin area) and go to menu Price Rules/ Catalog Price Rules and press "New". At the page that opens fill in the price rule info like: Name = "Christmas Offer -20%", Currency = "All currencies", Country = "All countries", Group = "All groups", From quntity = "1" (you can set here the number of products that have to be added to the cart in order this offer to be valid) Price (tax excl.) = "Leave base price" (the checkbox) From and To (the date range you want this offer to be applicable) Reduction type = "Percentage" Reduction = "20.00" and click save. After that there will be a message over all product prices, at the products list (when you click to view all products of a category), that sais something like "Reduced Price!" and the prices displayed will be redused by 20%. The product page (when you click to see the product details) should have more details about the discount. In order to show the original price of the products in the product list, back up files theme/yourTheme/css/global.css , theme/yourTheme/product-list.tpl. Also from your Back office go to "Advanced Parameters" and set Template Cache to Force compilation and Cache to No "the X mark" (so you can see the changes you make on the files). Open file theme/yourTheme/css/global.css with a text editor and at the very bottom add a new class like: .my-old-product-price-style{ color:red; text-decoration:line-through; } Open file theme/yourTheme/product-list.tpl and go to line 53 and add this <span class="my-old-product-price-style">{convertPrice price=($product.price/0.8)}</span> just before the <span class="price" style="display: inline;"> . The 0.8 derives from 100 - 20(our discount 20%) = 80 -> 80% = 0.8 . So now you will be able to see the original price of your products at the products list. Don't forget to set Template Cache to Never Recompile Template Files and Cache to Yes "the tick mark" For Version 1.4.7.3 Unfortunatelly version 1.4.7.3 is not as advanced as 1.5.2 for this kind of discount, so if you can you should upgrade to 1.5.2. If you can not upgrade, follow these steps. The proper way, I suppose, is to go at each product and add a "Spesific price" from the prices tab. But it is a lot of work if you have 200 products. Also if you wish to create a mysql query it will get very complicated and perhaps you will get it wrong. So I suggest the following solution. First I have to emphasize that this solution will cover your discount needs only if you have one customer group (or you want to add the same discount to every customer group). The changes I suggest to some files will be visible to all Customers groups even if they do not have any discount. Also the prices at the front office are displayed with tax included. From the back office go to Customers/ Groups. Click the edit button of the group you want to apply the discount (eg. Default), and set the Discount to 20 % and click save. What we have accomplished with this is when users of this customer group visit your site they will see the prices reduced but there will be no notification about this discount. Display the "On sale!" message From your phpMyAdmin create a back up of the ps_product (where ps_ is your prefix) table and then run the query update ps_product set on_sale=1 Now in the products list and products details page you will see the message "On sale!" above the product's price. Display the old price For this again we have to edit some files of your theme. But first go to the back office -> Preferences-> Performance and set Force compile = "Yes" and Cache = "No". Keep a back up of the files theme/yourTheme/css/global.css , theme/yourTheme/product-list.tpl andtheme/yourTheme/product.tpl. Open the global.css and create a new class like this .my-old-product-price-style{ color:red; text-decoration:line-through; } Open the product-list.tpl file and at line 20 add this: <span class="my-old-product-price-style">{convertPrice price=($product.price / 0.8)}</span> just before <span class="price">.... The 0.8 is for a 20% discount (100% - 20% = 1 - 0.2 = 0.8). For 15% you should use 0.85, for 30% use 0.7. Now at the products list page you can see the old price and the new price of each product. Similar open the product.tpl file and at line 179 add this <span class="my-old-product-price-style">{convertPrice price=($productPriceWithoutRedution/0.8)}</span> just after <span class="our_price_display"> With this addition you will be able to see the old price at the product's details page. Don't forget to restore the cache settings at Preferences-> Performance and set Force compile = "No" and Cache = "Yes". That worked for me and I hope it will be usefull to somenone else!
- 1 reply
-
- 1
-
-
- discount
- all products
-
(and 4 more)
Tagged with: