Custom order field value cached?

  • Posts: 50
  • Thank you received: 1
  • Hikamarket Multivendor Hikashop Business
2 years 7 months ago #335576

-- HikaShop version -- : 4.4.3
-- Joomla version -- : 3.9.27
-- PHP version -- : 7.3.28
-- Browser(s) name and version -- : Chrome 90.0.4430.212

i have created a custom order field to get "Bill" true/false from customers.
First i have set the default to true, but now to false for environment needs.

Unfortunately customers that already have used cart for shopping with Bill set to true (default) now find Bill always set to true, even if now the default value is false.

Is this value saved for the account somewhere? Database? Cookie? Cache?
Is there a way to clear this "cached" value and have customers who already used cart for shopping have Bill set to false (default) ?

Thank you

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

  • Posts: 81423
  • Thank you received: 13056
2 years 7 months ago #335577


The value of custom order fields is stored along the cart data in the database until it is stored with the order at the end of the checkout when the order is created.
So it's normal that the new default value is not seen for users with already existing carts.
The data of the custom order fields is stored in the cart_fields column of the hikashop_cart table.
So an easy solution would be to run a MySQL query to clear that field for all the carts via your PHPMyAdmin:

UPDATE #__hikashop_cart SET cart_fields = '';
where #__ is to be replaced with the table prefix from your Joomla configuration.
However, that means that the data of all the custom order fields of all the carts not yet converted into orders will be lost. You can't just change the value of one field for all the carts.

Last edit: 2 years 7 months ago by nicolas.
The following user(s) said Thank You: matmosis

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

Time to create page: 0.055 seconds
Powered by Kunena Forum