HARVIE Posted October 7, 2009 Share Posted October 7, 2009 Hello,I find how to show wholesale price (like retail price) in product.I put this in product.tpl (at <!-- prices --> ):<!-- Showing wholesale price-->{if $product->wholesale_price}{l s='Wholesale price: '}{$product->wholesale_price|escape:'htmlall':'UTF-8'} € HT{/if}But, I still have 2 problems:First problem, I dont know how to convert decimal number. For example, if I put 200.000000 for wholesale price and 300.000000 for retail price in the back office, it shows 200.000000 for wholesale price and 300.00 for retail price (or 300 following options). How to convert automatically wholesale price like retail price?Second problem, when i generate an attribute for a product in the back office, i can both change wholesale price and retail price for this new attribute (in the back office). But only the retail price changes in the front office. What must I do in order to also change the wholesale price...If you can help me, that would be great...Thanks Link to comment Share on other sites More sharing options...
swguy Posted October 7, 2009 Share Posted October 7, 2009 In Admin when you select a product, if you look at the tabs below "Current Product" you'll see one of them is "Discounts." You can create Quantity Discounts here. Perhaps this would be a good way to do wholesale pricing. Link to comment Share on other sites More sharing options...
HARVIE Posted October 8, 2009 Author Share Posted October 8, 2009 Thanks for you help, i tried with the discount price but i really need to use the wholesale price. Link to comment Share on other sites More sharing options...
swguy Posted October 8, 2009 Share Posted October 8, 2009 OK, as long as you understand that it will be used for display only and not for actual pricing. What you'll want to do is:a) Create a function to return this value, formatted using number_format in classes/Product.php. Use "assign" to put it into a template in product.php c) Display the assigned variable in your template in themes/YOUR THEME/product.tpl. Link to comment Share on other sites More sharing options...
HARVIE Posted October 8, 2009 Author Share Posted October 8, 2009 Thanks for your reply. For the moment I put this in product.tpl in order to show the wholesale price :{if $product->wholesale_price}{l s=‘Wholesale price: ‘}{$product->wholesale_price|escape:‘htmlall’:‘UTF-8’} € HT{/if}That works (wholesale price is shown) but now I need to convert the decimal number (from example.000000 to example.00). I think I need to use a function like this one :{convertPrice price=$product->getPrice(false, $smarty.const.NULL, 2)} But I dont know where I should put it and how to convert it for wholesale_price...Any ideas?? Link to comment Share on other sites More sharing options...
HARVIE Posted October 8, 2009 Author Share Posted October 8, 2009 I didint create a function to return this value, formatted using number_format in classes/Product.php coz i dont know how to do. Link to comment Share on other sites More sharing options...
mabrur Posted February 22, 2010 Share Posted February 22, 2010 This problem also discussing in :http://www.prestashop.com/forums/viewthread/42515/P0/third_party_modules/wholesale_support_presta_1_dot_3_dot_0_dot_1I hope the solution immediately founded. Thanks http://www.batiknovita.com Link to comment Share on other sites More sharing options...
darqor Posted October 20, 2010 Share Posted October 20, 2010 I solved the problem!In the database at the product table, i changed the wholesale_price properties.Changed the decimal from 20,6 to 20,2 and now i have the result i wanted! just 2 decimals are showing at the wholesale price. hope this gonna help for others as well! Link to comment Share on other sites More sharing options...
darius Posted November 30, 2010 Share Posted November 30, 2010 Interesting. I do need to show wholesale prices as well. I accessed my MySQL data base and the product table but I don't know how to change the wholesale_price properties. Could you explain how did you do that, please? I will be very grateful. Thank you very much for your help.Darius Link to comment Share on other sites More sharing options...
darqor Posted March 2, 2011 Share Posted March 2, 2011 In php my admin, look for the wholesale_price and Changed the decimal from 20,6 to 20,2. and thats it.if this doesn`t help, let me know and i gonna do a step by step 4u.sorry for the late answer Link to comment Share on other sites More sharing options...
darqor Posted March 2, 2011 Share Posted March 2, 2011 I am trying now to do a new thing, now that i can c the wholesale_price on the product page, i want to enable it for the discount as well... anyone know anything about this? coz the discount worx just for the price.I inserted this in front of the , so the wholesale price shows before the final price. {l s='Wholesale price:'} {$product->wholesale_price} {$wholesale_price} euro/dollar....what ever And now trying to rewrite it if is possible for the discount as well....Any help would be great.cheers Link to comment Share on other sites More sharing options...
eleit Posted July 26, 2012 Share Posted July 26, 2012 I solved the problem! In the database at the product table, i changed the wholesale_price properties. Changed the decimal from 20,6 to 20,2 and now i have the result i wanted! just 2 decimals are showing at the wholesale price. hope this gonna help for others as well! Hello Darqor,have you tried it in the new 1.5 version. I made it in one of my sites in the 1.4.6 version and it worked, but in the 1.5 it doesn't work. Do you have some idea? Link to comment Share on other sites More sharing options...
malloco Posted February 25, 2014 Share Posted February 25, 2014 i do also need this option. Anybody can help us, please?? Link to comment Share on other sites More sharing options...
malloco Posted February 25, 2014 Share Posted February 25, 2014 Thank you so much!! Problem Solved!! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now