- Posts: 52
- Thank you received: 6
Product edition form in order
5 years 3 months ago #333521
by dhusband
Product edition form in order was created by dhusband
-- HikaShop version -- : 4.4.3
-- Joomla version -- : 3.9.27
-- PHP version -- : 7.3.28
-- Browser(s) name and version -- : Edge
Custom field Item 'Proposed Dates'. Set to display in Front End as an option for the user to complete on buying an item. Details displays in front end listing and backend listing. Field is not set to display in 'Product edition form in order'
Custom field Item 'Confirmed Start Date'. Set to only display in Front and Back end product listing, plus in 'Product edition form in order'.
When data is updated in 'Product edition form in order', any fields that are not displayed are cleared. So information added by the customer in 'Proposed Dates' is lost.
If the field is not shown to the backend user to complete, shouldn't the data added by the frontend user be retained?
David
-- Joomla version -- : 3.9.27
-- PHP version -- : 7.3.28
-- Browser(s) name and version -- : Edge
Custom field Item 'Proposed Dates'. Set to display in Front End as an option for the user to complete on buying an item. Details displays in front end listing and backend listing. Field is not set to display in 'Product edition form in order'
Custom field Item 'Confirmed Start Date'. Set to only display in Front and Back end product listing, plus in 'Product edition form in order'.
When data is updated in 'Product edition form in order', any fields that are not displayed are cleared. So information added by the customer in 'Proposed Dates' is lost.
If the field is not shown to the backend user to complete, shouldn't the data added by the frontend user be retained?
David
Please Log in or Create an account to join the conversation.
5 years 3 months ago #333525
by nicolas
Replied by nicolas on topic Product edition form in order
Hi,
Thanks for the feedback.
This can be fixed by changing the code:
to:
in the file administrator/components/com_hikashop/classes/order.php
That change should even help if you have required fields for some products as otherwise, it might not let you save the fields of other products in the order edition.
Please confirm how that patch goes on your end so that we can include the modification on our end.
Thanks for the feedback.
This can be fixed by changing the code:
Code:
$item_fields = $fieldClass->getData('backend', 'item');
Code:
if(!empty($data['order']['product']['product_id'])) {
$oldData = $orderProductClass->get($data['order']['product']['product_id']);
}
$item_fields = $fieldClass->getFields('display:order_edit=1', $oldData, 'item', 'user&task=state');
That change should even help if you have required fields for some products as otherwise, it might not let you save the fields of other products in the order edition.
Please confirm how that patch goes on your end so that we can include the modification on our end.
Please Log in or Create an account to join the conversation.
5 years 3 months ago #333532
by dhusband
Replied by dhusband on topic Product edition form in order
Great that has resolved disappearing data.
However, there is a field of checkboxes. If you update this in the backend, it no longer stores the changes.
Thank you
David
However, there is a field of checkboxes. If you update this in the backend, it no longer stores the changes.
Thank you
David
Please Log in or Create an account to join the conversation.
5 years 3 months ago #333534
by dhusband
Replied by dhusband on topic Product edition form in order
I have not yet applied the fix to the live environment and realised the checkboxes are not updating. So this not due to the fix, but a different bug.
Please Log in or Create an account to join the conversation.
5 years 3 months ago #333539
by nicolas
Replied by nicolas on topic Product edition form in order
Hi,
Could you describe the issue with the checkboxes and provide some screenshots, like a screenshot of the settings of the custom field ?
Could you describe the issue with the checkboxes and provide some screenshots, like a screenshot of the settings of the custom field ?
Please Log in or Create an account to join the conversation.
5 years 3 months ago #333580
by dhusband
Replied by dhusband on topic Product edition form in order
Afternoon
If you set the checkboxes in the frontend, they save.
If you set the checkboxes in the backend, they do not save. If checkboxes are set and remove all of them, they do get saved. You cannot reset them and the reverse idea of ticking all checkboxes does not save.
Screenshot of the field set up attached.
If you set the checkboxes in the frontend, they save.
If you set the checkboxes in the backend, they do not save. If checkboxes are set and remove all of them, they do get saved. You cannot reset them and the reverse idea of ticking all checkboxes does not save.
Screenshot of the field set up attached.
Please Log in or Create an account to join the conversation.
5 years 3 months ago #333584
by nicolas
Replied by nicolas on topic Product edition form in order
Hi,
Thank you for the details. I've actually dug a bit deeper and properly tested different cases and thus I came up with a bigger patch.
I've added the patch on our end.
To get it, download the install package of the latest HikaShop on our website and install it on yours and it will add it.
Thank you for the details. I've actually dug a bit deeper and properly tested different cases and thus I came up with a bigger patch.
I've added the patch on our end.
To get it, download the install package of the latest HikaShop on our website and install it on yours and it will add it.
Please Log in or Create an account to join the conversation.
5 years 3 months ago #333599
by dhusband
Replied by dhusband on topic Product edition form in order
Great, that has worked.
Thank you
David
Thank you
David
Please Log in or Create an account to join the conversation.
Time to create page: 0.259 seconds