Alternate Shipping Address Issue in Checkout

  • Posts: 100
  • Thank you received: 1
9 years 6 months ago #202163

-- url of the page with the problem -- : www.totalpipes.co.uk/
-- HikaShop version -- : 2.4.0
-- Joomla version -- : 3.4.1
-- PHP version -- : 5.4.40
-- Browser(s) name and version -- : Internet Explorer (all versions)
-- Error-message(debug-mod must be tuned on) -- : script 5007 error unable get property 'value’

When adding an alternative delivery address when checking out it is defaulting to the original address. This issue only occurs in internet explorer, all other browsers are fine. When looking at the dev tools, it shows the error 'script 5007 error unable get property 'value’. This seems to be from the ‘init.js' file.

Once submitted, the address is not available from the address drop-down menu. Yet when you back out of the check out and re-enter, the new delivery address is selectable. As stated this is only an issue with internet explorer.

Please help me fix this issue.

Thanks

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

  • Posts: 26159
  • Thank you received: 4028
  • MODERATOR
9 years 6 months ago #202215

Hi,

I can't reproduce your issue using Internet Explorer 11 but when I want to edit an address in the checkout, the "save" button is not display properly (does not have any image) so I had to click on the link even if it's not really "visible".
But I could create two addresses for the "test hikashop" account.

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: 100
  • Thank you received: 1
9 years 6 months ago #202275

Hi Jerome,

We have tried it in several versions of Internet Explorer, including 11, but still having issues.

The problem is not that it doesn't save the address. The problem is when we click the 'Save' button, it does save the new address, but it disappears and we cannot select it, and Hikashop reverts to the billing address. Only if we click out of the checkout page and come back to it can we see or select the new shipping address.

I noticed the following error in Developer Tools but not sure if it is related:
Unable to get property 'value' of undefined or null reference

This is currently happening on a live website so I am eager to get this fixed as soon as possible and massively appreciate any help with this.

Thank you.

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

  • Posts: 26159
  • Thank you received: 4028
  • MODERATOR
9 years 6 months ago #202364

Hi,

Thanks for the clarification on the issue.
I was able to reproduce your issue and with some configuration I have also reproduce it in my local website.

In order to fix the issue, the best is to add some "checks" in the view "checkout | address_select" and replace

	for(var k in el_sel.options) {
By
	for(var k in el_sel.options) {
		if(!el_sel.options.hasOwnProperty(k))
			continue;

And same thing for
	for(var k in ot_sel.options) {
With
	for(var k in ot_sel.options) {
		if(!ot_sel.options.hasOwnProperty(k))
			continue;

In the view you will have make the replacement several times (and be careful on the "ot_sel" and "el_sel").
Internet Explorer does not deal like other browsers for the "for()" while looking at the content in a dropdown ; the extra check will avoid that issue.

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: 100
  • Thank you received: 1
9 years 6 months ago #202459

Hi Jerome,

Thanks for your help with this. Unfortunately it didn't fix the issue.

I have been through ‘checkout | address_select' and added the required additional JS.

for(var k in el_sel.options) {
to
for(var k in el_sel.options) {
if(!el_sel.options.hasOwnProperty(k))
continue;
and
for(var k in ot_sel.options) {
to
for(var k in ot_sel.options) {
if(!ot_sel.options.hasOwnProperty(k))
continue;

I have checked and replaced all instances that the above occurs in the code. I have double checked to ensure that I have not replaced the el_sol with ot_sel and vice versa.

Unless we have a caching issue on our system, this form should now work in accordance with Jerome's instructions. Is there another view we need to edit?

Thanks again

Last edit: 9 years 6 months ago by reders.

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

  • Posts: 82910
  • Thank you received: 13379
  • MODERATOR
9 years 6 months ago #202509

Hi,

Jerome reproduced the bug and tested the solution before giving it to you. So if you still have the problem, it means that you missed something in the changes you made.

Here is a zip with the full file with the patches included in it. Replace it on your website in the folder components/com_hikashop/views/checkout/tmpl, remove the view customization that you have on that view file via the menu Display>Views and it will work.

File Attachment:

File Name: address_select.zip
File Size:3 KB

Attachments:
Last edit: 9 years 6 months ago by nicolas.

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

  • Posts: 100
  • Thank you received: 1
9 years 6 months ago #202539

Hi guys,

Yes, sorry. Jerome's instructions worked perfectly.

We followed the instructions but we had some weird issue where the template override wasn't updating.

We've fixed this now so thank you very much for the help.

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

Time to create page: 0.065 seconds
Powered by Kunena Forum