Jump to content

Prestashop calling shipping carrier code 4 times on every page.


Recommended Posts

No wonder its slow.

 

Why getOrderShippingCost called 4 times?

 

I have 2 carrier and its called 8 times. I just put echo statement there it printed 8 times in all pages not just product page or cart page. Every page.

 

There need to be better way to get shipping and it should be only on cart page where carrier value show.

 

anyone have ideas why?

Link to comment
Share on other sites

The problem i am facing is that caching shipping price. Initially i thought i match cart update time if i did not add new product or change product config. But everytime getOrderShippingCost  called cart update time gets changed.

 

SO only other way is matching key fields like product , options , quantity etc. It slow down site comparing those fields.

 

I converted it to hash and stored in db and comparing. Slight improvement. But i still do not like prestashop calling shipping pricing on every page. Anyone knows some internals. 

Link to comment
Share on other sites

×
×
  • Create New...