aivars Posted August 5, 2011 Share Posted August 5, 2011 is there any way or module to use to have text - backorder displayed in "add to card" button when product is not in stock but allowed to order. prestashop - 1.4 .....any brainstorm from prestashop gurus!!! Link to comment Share on other sites More sharing options...
shokinro Posted August 5, 2011 Share Posted August 5, 2011 assume you are talking about product page. you can add following code beside the "add to cart" button in /themes/YourTheme/product.tpl file {if $product->quantity <= 0}{l s='backorder'}{/if} For example, Code before adding the new code <span class="exclusive">{l s='Add to cart'}</span> code after adding the new code <span class="exclusive">{l s='Add to cart'} {if $product->quantity <= 0}{l s='backorder'}{/if} </span> hope this gives you some clue Link to comment Share on other sites More sharing options...
aivars Posted August 5, 2011 Author Share Posted August 5, 2011 I will try it as soon as I can and report about result. Thanks for advice shokinro!! Link to comment Share on other sites More sharing options...
aivars Posted August 8, 2011 Author Share Posted August 8, 2011 I will try it as soon as I can and report about result. Thanks for advice shokinro!! I am afraid it wasn’t working for me. I did not find exact code <span class="exclusive">{l s='Add to cart'}</span> in my /themes/YourTheme/product.tpl. I searched intensively!!! I tried to adapt to my code best as I could but result was undesirable. In best case I had button backorder instead of add to card showing but it wasn’t adding product to card. Of course, highly possibly is due to my amateur knowledge of coding languages and principals. So if you interested try out shokinro suggestion – I don’t say it’s wrong. My prestashop is 1.4 I am wondering way there is no backorder module available. Backorder module should as well contain availability to choose which exactly products are for backorder when not in stock or be activated by selecting "allow orders" exemption when out of stock in BO catalog - current product. Shokino and others – I anyway interested in further suggestions or notes from you about backorder. Link to comment Share on other sites More sharing options...
shokinro Posted August 8, 2011 Share Posted August 8, 2011 can you upload yout product.tpl here? It is better to rename it before upload, otherwise, it may be not allowed. Link to comment Share on other sites More sharing options...
aivars Posted August 9, 2011 Author Share Posted August 9, 2011 can you upload yout product.tpl here? It is better to rename it before upload, otherwise, it may be not allowed. here it is!! thanks for help!! I converted it to html to be able to upload. product_for rewiew.html Link to comment Share on other sites More sharing options...
tivicrdotcom Posted January 17, 2012 Share Posted January 17, 2012 That can be done on the product description on: "Displayed text when allowed to be back-ordered:" You can add any text you want displayed when the product quantity reaches zero. Link to comment Share on other sites More sharing options...
robisq Posted March 17, 2012 Share Posted March 17, 2012 assume you are talking about product page. you can add following code beside the "add to cart" button in /themes/YourTheme/product.tpl file {if $product->quantity <= 0}{l s='backorder'}{/if} For example, Code before adding the new code <span class="exclusive">{l s='Add to cart'}</span> code after adding the new code <span class="exclusive">{l s='Add to cart'} {if $product->quantity <= 0}{l s='backorder'}{/if} </span> hope this gives you some clue I dont know about others, but that doesnt work for me. Heres my solution. find you product-list.tpl and on line 49 you should see this. <a class="button ajax_add_to_cart_button exclusive" rel="ajax_id_product_{$product.id_product|intval}" href="{$link->getPageLink('cart.php')}? add&id_product={$product.id_product|intval}{if isset($static_token)}&token={$static_token}{/if}" title="{l s='Add to cart'}">{l s='Add to cart'}</a> Change it to this, and i believe you'll get what you want. <a class="button ajax_add_to_cart_button exclusive" rel="ajax_id_product_{$product.id_product|intval}" href="{$link->getPageLink('cart.php')}? add&id_product={$product.id_product|intval}{if isset($static_token)}&token={$static_token}{/if}" title="{if $product.quantity > 0}{l s='Add to cart'}{elseif (isset($product.quantity_all_versions) && $product.quantity_all_versions > 0)}{l s='Product available with different options'}{else}{l s='Backorder'}">{if $product.quantity > 0}{l s='Add to cart'}{elseif (isset($product.quantity_all_versions) && $product.quantity_all_versions > 0)}{l s='Product available with different options'}{else}{l s='Backorder'}{/if} </a> Let me know how it works out Link to comment Share on other sites More sharing options...
lweinlan Posted November 12, 2012 Share Posted November 12, 2012 (edited) to Robisq you forgot the {/if} statement after the first {l s='Backorder'} correct working code is: <a class="button ajax_add_to_cart_button exclusive" rel="ajax_id_product_{$product.id_product|intval}" href="{$link->getPageLink('cart.php')}? add&id_product={$product.id_product|intval}{if isset($static_token)}&token={$static_token}{/if}" title="{if $product.quantity > 0}{l s='Add to cart'}{elseif (isset($product.quantity_all_versions) && $product.quantity_all_versions > 0)}{l s='Product available with different options'}{else}{l s='Backorder'}{/if}">{if $product.quantity > 0}{l s='Add to cart'}{elseif (isset($product.quantity_all_versions) && $product.quantity_all_versions > 0)}{l s='Product available with different options'}{else}{l s='Backorder'}{/if} </a> Edited November 12, 2012 by lweinlan (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts