Custom fields edited not kept if shipping or payment method switched

  • Posts: 148
  • Thank you received: 21
  • Hikashop Business
2 years 4 months ago #343342

Hi,

I had already mentioned my issue with the save of fields at each step of the checkout process.
( www.hikashop.com/forum/shipping-methods/...for-each-result.html )

My problem is different but I think that it's related to this:
I created a custom field for the customers who want to leave a comment during their order.
I put it at several steps (cart, delivery method and payment) if they wanted to add more information (or remove some).
If the user fills this "comment" field and changes the shipping or payment method, the comment will return to its original value.

I could put this field in a separate step to make it work without too much trouble, but it's not really ideal: it will add steps just for that, and the problem of the last step, which is the choice of the payment method, will remain.

Would it be possible to keep the content of the comment (all the custom fields in fact) when changing the shipping or payment method?

Thanks in advance for your answer.

Last edit: 2 years 4 months ago by FDBI.

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

  • Posts: 4747
  • Thank you received: 644
  • MODERATOR
2 years 4 months ago #343347

Hello,

Sorry for this returns but in order to allow to better understand your needs and your issue can you provide these elements :
- An Url link to your website
- A step by step to reproduce the issue (or allow us to understand the context)
- Relative screenshot of your custom fields settings
- Any other elements than can help us to better understand.

Awaiting your elements to progress in your subject.
Regards

Last edit: 2 years 4 months ago by Philip.
The following user(s) said Thank You: FDBI

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

  • Posts: 148
  • Thank you received: 21
  • Hikashop Business
2 years 4 months ago #343367

Hi,

This message contains confidential information

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
2 years 4 months ago #343374

Hi,

This is normal because you can restrict the custom fields based on the selected shipping / payment method. So when you change the selection, the system refreshes the custom order fields in case the fields to be displayed are different.

You can edit the file show_block_fields via the menu Display>Views.
There, you'll find this line near the end:

window.Oby.registerAjax(['checkout.fields.updated','cart.updated','checkout.shipping.changed','checkout.payment.changed'], function(params){
change it to :
window.Oby.registerAjax(['checkout.fields.updated','cart.updated'], function(params){
and the fields view won't refresh when you change the shipping/payment method selected.

The following user(s) said Thank You: Philip, FDBI

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

  • Posts: 148
  • Thank you received: 21
  • Hikashop Business
2 years 4 months ago #343379

Hi,

Perfect, that's exactly it.

Thanks a lot !

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

Time to create page: 0.063 seconds
Powered by Kunena Forum