Checkout - Selecting different Payment Method loses Ship Method Custom Fields

  • Posts: 99
  • Thank you received: 7
  • Hikashop Business
6 months 1 week ago #360976

-- HikaShop version -- : 5.0.4
-- Joomla version -- : 4.4.4
-- PHP version -- : 8.2.18
-- Browser(s) name and version -- : Firefox

This is a weird one - it may have something to do with customisations from a previous developer I can't find.

We have 2 Custom Fields set up in the Order table - Pickup date and Pickup Time. These are displayed in a Shipping Method using the Hikashop Manual Shipping Method at Checkout.

At checkout when the user selects this Shipping Method (Click and Collect), they can fill in the Pickup Date & Pickup Time fields.

But if they change from the default Payment Method to another Payment Method then the 2 custom fields and their values disappear.

If you refresh the page, the 2 Custom Fields reappear and are populated.

Could you please advise on action to debug this as I can't find any overrides in the checkout or shipping method areas. I can't think of a way to make custom fields appear in a Shipping Method so that's why I have a feeling it's a customisation.

Thanks for your help.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
6 months 1 week ago #360978

Hi,

I would recommend first checking the settings of the custom fields.
In them, you'll find "shipping methods" and "payment methods" settings to restrict the display of the custom fields based on selected methods.
Could it be what is used ?

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

  • Posts: 99
  • Thank you received: 7
  • Hikashop Business
6 months 1 week ago #361012

Thanks for the quick response Nicolas.

I checked the Custom Fields and there are no restrictions at all. I tried restricting them to a particular Shipping Method and then they do not appear at all.

Any other suggestions on how to find this customisation?

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
6 months 1 week ago #361018

Hi,

So, I went to your website in order to look at the situation, hoping to better understand what's going on.
I had a hard time to get a shipping method to appear. I had to find a real address in Australia.
And I never saw any "shipping method custom fields", regardless of which payment method was selected.
So I'm not sure what we're talking about.
Could you provide some screenshots to illustrate the issue, and precise step by step instructions in order to reproduce the issue ?

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

  • Posts: 99
  • Thank you received: 7
  • Hikashop Business
6 months 1 week ago #361034

Thanks Nicolas

Here are the steps to reproduce (you're correct, it's quite complicated):

Add a product to your cart such as this one:

www.test.midwestmeats.com.au/online-butc...16-the-carnivore-box

Go to checkout:

Use the Postcode 3242 with an Australian address

Select the Shipping Method "Click 'N' Collect & 13th BGC (min. order $50) Free shipping"

2 x Custom fields are displayed for **Pickup Day & Date and **Pickup Time

Accept Terms & Conditions

Select the Payment Method "PayPal Checkout". Scroll back up to the Shipping Method and the Custom Fields have disappeared.

Refresh the page and the Custom Fields are displayed once more.

Hope this helps you reproduce.

I have also attached screenshots of the Custom Field screens.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
6 months 1 week ago #361038

Hi,

Ok, thanks.
From what I understand, the view file checkout / show_block_shipping has been customized in order to display these two fields. However, it doesn't take into account all the possible cases properly.

Also, the fact that the custom fields sometimes also appear / disappear in the custom field area is strange. There are no shipping method or payment method restrictions in the settings of these fields. So it tells me that there is probably also a customization of checkout / show_block_fields.

Also, note that the developer can potentially develop a custom plugin implement such changes without actually creating view overrides for these views.

If I were you, the first thing I would do would be to try to reach that developer so that he can sort the problem. It's him who made these changes so he knows them better than anyone else.
If that's not possible, then, I think it would actually be better to just remove these modifications as I don't think they are necessary anymore.
HikaShop now has the "shipping methods" restriction setting in custom order fields.
So you can already restrict the display of custom fields based on which shipping method is displayed.
You can also have several "fields" view in your checkout workflow, so you could have a fields view with the "add note" field at the top of the step, and a second "fields" view just below the shipping methods selection for the time and date selectors, so that it would display them when necessary, just below the shipping methods selection.

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

  • Posts: 99
  • Thank you received: 7
  • Hikashop Business
6 months 6 days ago #361068

Thanks very much for your support Nicolas

The only view customisation I could find was on product show_block_tags so I have removed that anyway and added a new Shipping Method with the custom fields associated with it.

That seems to work well now.

The following user(s) said Thank You: nicolas

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

Time to create page: 0.072 seconds
Powered by Kunena Forum