Jump to content

Adding delivery time add order_conf and payment/order overview


Gertjezzz

Recommended Posts

Hello,

Thank you in advance for taking the time to read. Hopefully we can get this working :)

I read many posts and topics and got the basic understanding of altering files.

 

By law it is necessary to state the estimated delivery time on the order.

Now I have 3 places where this need to be stated. When a first is fixed i think the other 2 will have the same approach.

 

  1. I want the estimated delivery date placed in de order/payment summary/overview at the end just before paying
  2. I want the estimated delivery date placed after the costumer has placed the order in the overview
  3. I want the estimated delivery date placed in the order_conf.html and .txt email to the costumer

 

I read this (old) topic but its from an older prestashop version, and I cant get it to work. It looks like the files are altered due to newer prestashop versions. Probably I need another rule or file. Just for clarification: I added '{delivery_time}' => $carrier->delay[intval($order->id_lang)], at line 632 of PaymentModule.php: 

This is what I allready did:

I altered the order_conf.html and .txt files to add the {delivery_time} and classes/PaymentModule.php but my email places just {delivery_time} and not the needed info.

When an item is in stock my delivery would be next day, when its not in stock it has another value/delivery time. When multiple items are bought the longest value should be placed in {delivery_time}.

 

 

1) here is an order overview. I need the estimated delivery date in the yellow marked value. I think i need to adapt the cart-summary.tpl file (or similar) in themes/(MYTHEME)/templates/checkout/_partials.

image.thumb.png.207cbee80132c6213ad778aeb3f4c74c.png 

2) After proceeding and placing the order i like the same value placed in this yellow area: I already have here a date - but this date is wrong or at least looks static. The item is in back order and would take longer to deliver. My guess is if i got issue 1 right then issue 2 isn’t much far off.

image.thumb.png.df9662d61641c5a4609d88ecdbfd9593.png

 

 

3) After altering the order_conf.html and .txt files i got the right place, but after ordering it isn’t getting filled.

image.png.cbfb016a7da607d57ccff0623ed91433.png

I am on Prestashop 1.7.7.7 with an external theme.

Kind regards!

 

 

 

 

Edited by Gertjezzz
Removed privacy info (see edit history)
Link to comment
Share on other sites

Allright, I made some progress. 

I managed to create an own .tpl file (called levertijd.tpl - check attachtment) and placed this in the folder /themes/brandfashion/templates/catalog/_partials

Then is changed the products.tpl in /themes/brandfashion/templates/catalog so that the .tpl file is loaded. Now i get the manual text when an item is in stock or it is out of stock with the desired delicery_time on my product page. This is a nice addition into my search to the solutions for my 3 problems.

 

Now i tried the same trick to my checkout. I copied the same .tpl file to my /themes/brandfashion/templates/checkout_partials and changed  the checkout.tpl file in /themes/brandfashion/templates/checkout.

Now i almost got the right spot but it isnt loading content. The block stays empty.

image.png.2deafe917c589897cb904e0e94047e41.png

 

I believe im not very far of the solution, is there someone who can point me in the right direction for placing the maxmimum delivery_time into my emails?

 

 

lever-tijd.tpl

Link to comment
Share on other sites

  • 3 weeks later...

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...