Jump to content

[SOLVED] States aren't displayed in the cart summary


Recommended Posts

why have the display of my states dissapeared in the cart summary page and also in my print ship label mod? i had them being displayed before and now i did something and gone. can't get them back to save my life... someone please help

Share this post


Link to post
Share on other sites

i guess it was a bug that was in 1.3 but has been resolved... would love to know how to resolve this issue with 1.2 for ive tried everything (copying code from 1.3, to trying my own code versions, to different tpl file codes for states) none works and it doesnt makes sense. on all the other pages the state will show up, except for on the summary page which is the order.php and i edit the shopping-cart.tpl file... someone please help me

thanks
devilman

Share this post


Link to post
Share on other sites
  • 4 weeks later...

This bug has been reported and fixed in Prestashop v1.3. To fix this issue in Prestashop v1.2.5, change line 230 of shopping-cart.tpl in your theme's directory from:

{$delivery->country|escape:'htmlall':'UTF-8'}



to:

{$delivery->country|escape:'htmlall':'UTF-8'} {if $delivery_state}({$delivery_state|escape:'htmlall':'UTF-8'}){/if}



and line 241 from:

{$invoice->country|escape:'htmlall':'UTF-8'}



to:

{$invoice->country|escape:'htmlall':'UTF-8'} {if $invoice_state}({$invoice_state|escape:'htmlall':'UTF-8'}){/if}



and change lines 875-876 of classes/Cart.php from:

'delivery' => new Address(intval($this->id_address_delivery)),
'invoice' => new Address(intval($this->id_address_invoice)),



to:

'delivery' => $delivery,
'delivery_state' => State::getNameById($delivery->id_state),
'invoice' => $invoice,
'invoice_state' => State::getNameById($invoice->id_state),

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More