Jump to content

Display out-of-stock delivery time in the shopping cart


DaDa Bikinis

Recommended Posts

Hello,

As we are doing production on order, I would like to recall in the basket summary the production time. I use the field "Delivery time for out of stock products with restocking allowed" in the product settings.

This delay (e.g. 3 weeks) is displayed correctly on the product page, so I wanted to reuse the following lines from product-price.tpl, which calls the variable "$product.delivery_information":

 <div class="tax-shipping-delivery-label">

...

{l s='No stock, manufacturing time is currently ' d='Shop.Theme.Catalog'} <b><span class="delivery-information">{$product.delivery_information}</span></b>

...

But when I implement it in cart-detailed-product-line.tpl for example, it shows me the delivery time for products in stock (1-2 days).

Thanks in advance for your help if anyone has a clue?

Link to comment
Share on other sites

On 4/20/2022 at 5:45 PM, lordignus said:

Instead of $product.delivery_information, use $product.delivery_out_stock

That's assuming that you're setting the delivery time for each product?

For me that's not ideal as it's the whole production who has delays, so it's easier to set it in parameter/products.

I found a temporary solution using the variable $product.availability_message and putting the production delay under "Label of out-of-stock products with allowed backorders" in parameter/products:

1332236141_Screenshotfrom2022-04-2311-38-36.thumb.png.b2d048af6d486d92aca3c06f58ed11c6.png

 

 

What I don't understand it's why $product.delivery_information has not the same output between catalog and cart...

Link to comment
Share on other sites

  • 3 months later...

Hello.

I have the same problem, I managed to get the catalog (product-add-to-cart.tpl) to show both default and custom-set delivery time information and it works perfectly, but {$product.delivery_information} does not return any value when calling it from the shopping cart (cart-detailed-product-line.tpl).

I don't understand why.

Anyone know the reason ?

Thank you very much

 

Catalog :

image.png.9e7148ba6edf098077727511f0e0a268.png

Shopping cart :

image.png.595e1aaa987e81059a9ca9cf94597dc6.png

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...