Addresses in Hikashop

  • Posts: 25
  • Thank you received: 1
11 years 10 months ago #84427

Hi,
We are building a customized internal eCommerce website for a company. The company would like their employees to purchase items through their system instead of buying directly to the suppliers.

When an employee register to the site, they choose their office location from a drop down list of addresses.

With your help, we have removed in hikashop the option to update and typing manually different addresses. The user still have the option to change their office address by going to the user profile and choose from the drop list another location.

Everything seems to work fine so far but there is an issue with the shipping address when receiving a confirmation email. The email doesn't show the latest address from the order. It shows up OK in the admin UI though.

**** EDITED ****
After more testing, we noticed that when a user change its address and order an item...the Billing/Shipping address is still the old one when receiving the email confirmation. Although, If the user logout and login, the Billing/Shipping will be correct when receiving an email confirmation. Is there a way to fix this change address issue without login out?

Also, in administrator/components/com_hikashop/views/order/tmpl, our developer is asking which of these files contains the view code for the orders screen?


Thanks!

Last edit: 11 years 10 months ago by reeses007.

Please Log in or Create an account to join the conversation.

  • Posts: 26152
  • Thank you received: 4027
  • MODERATOR
11 years 10 months ago #85051

Hi,

How did you implemented the drop down list ?
If the address is stored in the database there is no reason that a wrong address is send by email.

What do you mean by orders screen ?
Modifying views directly in HikaShop is highly not recommended. Please use the view overrides.
We could not provide right support if you have modified directly views and you can't make updates.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 25
  • Thank you received: 1
11 years 10 months ago #85089

Hi Jerome,
Yes it is stored in the database. It seems that the email notification read the database values when the user login but if the address change during the session, it doesn't query the latest information in the tables.

Here is another example of this issue.

We modified the step.php file. Before the user submit their order, he/she can choose from a drop down list a different shipping destination (the addresses are predefined in the list). See attachment.

We also updated the checkout.php in the controller folder to save the shipping address in the hikashop address table.

Once the user submit the order, everything is working fine. But, in the email notification, the shipping address doesn't show the latest update. When we go in the ui admin, everything is correct (ie: the shipping address is the latest value).

It seems that we need to update or reset something so the email notification so it would query the latest update in the database.

I could PM you the credentials to access the site if you need to see.

Thanks

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 26152
  • Thank you received: 4027
  • MODERATOR
11 years 10 months ago #85161

Hi,

The address in the email is loaded from the order/cart object.
So it is loaded from the database but, during the checkout, the address selected is loaded thanks to the session.

// Get
$shipping_address_id = $app->getUserState( HIKASHOP_COMPONENT.'.shipping_address');
$billing_address_id = $app->getUserState( HIKASHOP_COMPONENT.'.billing_address');
// Set
$app->setUserState( HIKASHOP_COMPONENT.'.shipping_address', $shipping_address_id);
$app->setUserState( HIKASHOP_COMPONENT.'.billing_address', $billing_address_id);

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: reeses007

Please Log in or Create an account to join the conversation.

  • Posts: 25
  • Thank you received: 1
11 years 10 months ago #85309

Hi it seems to work much better now. Thanks for your pointers.

Last edit: 11 years 10 months ago by reeses007.
The following user(s) said Thank You: Jerome

Please Log in or Create an account to join the conversation.

Time to create page: 0.078 seconds
Powered by Kunena Forum