- Posts: 26
- Thank you received: 0
display selected addresses during cart status
- issa.mouawad
-
Topic Author
- Offline
Less
More
10 years 5 months ago - 10 years 5 months ago #239410
by issa.mouawad
display selected addresses during cart status was created by issa.mouawad
-- HikaShop version -- : 2.6.4
-- Joomla version -- : 3.4.8
Hi,
I am trying to customize the cart_status view to display the addresses that customer selected for order,
I looked in other views to know how to display the address, I got this,
it worked for simple address fields, but the state and the country aren't displayed correctly (they are only displayed with word Array)
can you please assist me on this?
-- Joomla version -- : 3.4.8
Hi,
I am trying to customize the cart_status view to display the addresses that customer selected for order,
I looked in other views to know how to display the address, I got this,
Code:
$addressClass = hikashop_get('class.address');
echo $addressClass->displayAddress($this->full_cart->fields,$this->full_cart->shipping_address,'address');
can you please assist me on this?
Last edit: 10 years 5 months ago by issa.mouawad.
Please Log in or Create an account to join the conversation.
10 years 5 months ago #239436
by nicolas
Replied by nicolas on topic display selected addresses during cart status
Hi,
You want to do like that:
You want to do like that:
Code:
$addressClass = hikashop_get('class.address');
$addresses = array('shipping_address'=>$this->full_cart->shipping_address);
$addressClass->loadZone($addresses);
echo $addressClass->displayAddress($this->full_cart->fields,$addresses['shipping_address'],'address');
Please Log in or Create an account to join the conversation.
- issa.mouawad
-
Topic Author
- Offline
Less
More
- Posts: 26
- Thank you received: 0
10 years 5 months ago #239447
by issa.mouawad
Replied by issa.mouawad on topic display selected addresses during cart status
thank you,I did exactly as you suggested, but i actually didn't solve my problem,
the state and country are still being displayed by word "Array"
the state and country are still being displayed by word "Array"
Please Log in or Create an account to join the conversation.
10 years 5 months ago #239458
by nicolas
Replied by nicolas on topic display selected addresses during cart status
Hi,
Ah yes, I had forgotten something. You need to add the line:
before:
in administrator/components/com_hikashop/classes/address.php and that code will work.
That modification will be in the next version of HikaShop.
Ah yes, I had forgotten something. You need to add the line:
Code:
if(is_array($address->$namekey)) $address->$namekey = reset($address->$namekey);
Code:
$zones[$address->$namekey] = $address->$namekey;
$quoted_zones[$address->$namekey] = $this->database->Quote($address->$namekey);
That modification will be in the next version of HikaShop.
Please Log in or Create an account to join the conversation.
- issa.mouawad
-
Topic Author
- Offline
Less
More
- Posts: 26
- Thank you received: 0
10 years 5 months ago #239473
by issa.mouawad
Replied by issa.mouawad on topic display selected addresses during cart status
Thanks , Now it's solved
Please Log in or Create an account to join the conversation.
Time to create page: 0.085 seconds