MyLibary Posted April 30, 2010 Posted April 30, 2010 There is any way to no put any price, and if customer for example put quantity of 1,000 pcs, it will go to admin pannel and the admin will send invoice with the price.Thanks alot,Marco. Share this post Link to post Share on other sites More sharing options...
rocky Posted April 30, 2010 Posted April 30, 2010 My post here may help you. Share this post Link to post Share on other sites More sharing options...
marufish Posted July 23, 2010 Posted July 23, 2010 Hi Rocky,I have check your old post. However, I am wondering if the following instruction still valid for version 1.3.1. The line 176 in version 1.3.1 is the "static public function switchLanguage()"Can you please kindly provide the latest instruction to change the "Price=0, return "Call for Price" for the new prestashop 1.3.1? Or in which section it should be located?Many Thanks,MarufishInstruction from Rocky in the forum http://www.prestashop.com/forums/viewthread/30213/#163653The way I would do it is to add the following at line 177 of classes/Tools.php (after the “$price =” line): if ($price == 0) return 'Call for price'; and modify js/tools.js in your theme’s directory and add the following to the start of the formatCurrency function: if (price == 0) return 'Call for price'; This will change all $0.00 to ‘Call for price’, but on the product page, it will display as ‘Call for price tax incl.’, so you’ll have to modify product.tpl and the tpls of any other modules if necessary and write something like {if $price != 0}{l s=‘tax incl.’}{/if}. You’ll have to modify modules/blockcart/blockcart.php too, since the totals will display as ‘Call for price’ when nothing is in the cart. {if !$priceDisplay || $priceDisplay == 2} {convertPrice price=$product->getPrice(true, $smarty.const.NULL, 2)} {if $product->getPrice(true, $smarty.const.NULL, 2) > 0}{l s='tax incl.'}{/if} {/if} {if $priceDisplay == 1} {convertPrice price=$product->getPrice(false, $smarty.const.NULL, 2)} {if $product->getPrice(false, $smarty.const.NULL, 2) > 0}{l s='tax excl.'}{/if} {/if} {if $priceDisplay == 2} {convertPrice price=$product->getPrice(false, $smarty.const.NULL, 2)}{if $product->getPrice(false, $smarty.const.NULL, 2) > 0} {l s='tax excl.'}{/if} {/if} {if ($product->reduction_price != 0 || $product->reduction_percent != 0) && ($product->reduction_from == $product->reduction_to OR ($smarty.now|date_format:'%Y-%m-%d' <= $product->reduction_to && $smarty.now|date_format:'%Y-%m-%d' >= $product->reduction_from))} {if !$priceDisplay || $priceDisplay == 2} {convertPrice price=$product->getPriceWithoutReduct()} {if $product->getPriceWithoutReduct() > 0}{l s='tax incl.'}{/if} {/if} {if $priceDisplay == 1} {convertPrice price=$product->getPriceWithoutReduct(true)} {if $product->getPriceWithoutReduct(true) > 0}{l s='tax excl.'}{/if} {/if} Share this post Link to post Share on other sites More sharing options...
rocky Posted July 23, 2010 Posted July 23, 2010 It should be after line 229 of classes/Tool.php in PrestaShop v1.3.1 and after line 44 of js/tools.js in your theme's directory and line 196 of product.tpl in your theme's directory. Share this post Link to post Share on other sites More sharing options...
marufish Posted July 23, 2010 Posted July 23, 2010 Thanks Rocky for the fast response.The first two action has worked properly, all the Price = 0 changed to "Call for Price". I attached here with theTools.php tools.jsHowever, when I replace the following code in the line 268 of Product.tpl, some error occurred.1. Missing product page of the items set to $02. The "Shipping" and "Total" items in the shopping cart still remain with "Call for Price"I attached here with the product.tpl for the prestashop theme. May I know if I did it wrong with the location of the code?Here is the coding that I paste into product.tpl {if !$priceDisplay || $priceDisplay == 2} {convertPrice price=$product->getPrice(true, $smarty.const.NULL, 2)} {if $product->getPrice(true, $smarty.const.NULL, 2) > 0}{l s='tax incl.'}{/if} {/if} {if $priceDisplay == 1} {convertPrice price=$product->getPrice(false, $smarty.const.NULL, 2)} {if $product->getPrice(false, $smarty.const.NULL, 2) > 0}{l s='tax excl.'}{/if} {/if} {if $priceDisplay == 2} {convertPrice price=$product->getPrice(false, $smarty.const.NULL, 2)}{if $product->getPrice(false, $smarty.const.NULL, 2) > 0} {l s='tax excl.'}{/if} {/if} {if ($product->reduction_price != 0 || $product->reduction_percent != 0) && ($product->reduction_from == $product->reduction_to OR ($smarty.now|date_format:'%Y-%m-%d' <= $product->reduction_to && $smarty.now|date_format:'%Y-%m-%d' >= $product->reduction_from))} {if !$priceDisplay || $priceDisplay == 2} {convertPrice price=$product->getPriceWithoutReduct()} {if $product->getPriceWithoutReduct() > 0}{l s='tax incl.'}{/if} {/if} {if $priceDisplay == 1} {convertPrice price=$product->getPriceWithoutReduct(true)} {if $product->getPriceWithoutReduct(true) > 0}{l s='tax excl.'}{/if} {/if} tools.js Tools.php product.tpl.txt Share this post Link to post Share on other sites More sharing options...
nicola Posted October 19, 2010 Posted October 19, 2010 Hi,I have modified the file tool.js and tools.php and as you wrote the problem now is that it shows "call for price with VAT".I tried to modify my product.tpl but without success. Could you explain better where and what I need to change to doesn't show "with VAT" when product price is set to zero?ThanksNicola Share this post Link to post Share on other sites More sharing options...
ScubaLessonsInc Posted June 23, 2011 Posted June 23, 2011 Worked in 1.4.25 Thanks Marufish! Of course such a sweet sharing developer has fish in there name Share this post Link to post Share on other sites More sharing options...
ScubaLessonsInc Posted June 28, 2011 Posted June 28, 2011 I had a bit of an error pop up.. The cart when you have nothing in the cart it too says "call for price" then you go to view another product and boom.. Fatal error: Uncaught exception ‘JSMinException’ with message ‘Unterminated string literal.’ in /home/tinao/public_html/tools/js_minify/jsmin.php:94 Stack trace: #0 /home/tinao/public_html/tools/js_minify/jsmin.php(235): JSMin->action(1) #1 /home/tinao/public_html/tools/js_minify/jsmin.php(64): JSMin->min() #2 /home/tinao/public_html/classes/Tools.php(1255): JSMin::minify(’// ??// PrestaS…’) #3 /home/tinao/public_html/classes/Tools.php(1242): ToolsCore::packJS(’// ??// PrestaS…’) #4 /home/tinao/public_html/classes/Tools.php(1233): ToolsCore::packJSinHTMLpregCallback(Array) #5 /home/tinao/public_html/config/smarty.config.inc.php(197): ToolsCore::packJSinHTML(’/\s*(<script\b[…’, Array, ‘<script type=“t…’) #6 /home/tinao/public_html/tools/smarty/sysplugins/smarty_internal_filter_handler.php(57): smartyPackJSinHTML(’<script type=“t…’) #7 /home/tinao/public_html/tools/smarty/Smarty.class.php(337): Smarty_Internal_Filter_Handler::runFilter(’<script type=“t…’, Object(Smarty_Internal_Template)) #8 /home/tinao/public_h in /home/tinao/public_html/tools/js_minify/jsmin.php on line 94I need to do this action but without the error.. can you help pretty please? Share this post Link to post 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