Jump to content

backorder displayed


Recommended Posts

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

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

  • 5 months later...
  • 2 months later...

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

  • 7 months later...

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 by lweinlan (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...