- Posts: 53
- Thank you received: 1
Custom order field value cached?
5 years 2 weeks ago #335576
by matmosis
Custom order field value cached? was created by matmosis
-- 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
Hi,
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
-- Joomla version -- : 3.9.27
-- PHP version -- : 7.3.28
-- Browser(s) name and version -- : Chrome 90.0.4430.212
Hi,
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.
5 years 2 weeks ago - 5 years 2 weeks ago #335577
by nicolas
Replied by nicolas on topic Custom order field value cached?
Hi,
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:
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.
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:
Code:
UPDATE #__hikashop_cart SET cart_fields = '';
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: 5 years 2 weeks 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.154 seconds