Custom fields editable also in cart

  • Posts: 21
  • Thank you received: 1
10 years 4 months ago #186743

-- HikaShop version -- : 2.3.5
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.4.27
-- Browser(s) name and version -- : Firefox 34.0
-- Error-message(debug-mod must be tuned on) -- : Custom fields editable also in cart

I have created some Custom fields for Products
During selecting Options for the product everything is OK
all fields are editable.

But my customers wants also to correct some Options later during Checkout in the Cart-Display
screenshot: Custom-fields-in-the-cart.jpg

so my question:
which PHP-files do i have to change (customize) for this special issue
For this special Project i have already made some changes in the Views:
(only the duplicates in my template)

templates\my-template\html\com_hikashop\product\show_block_custom_item.php
templates\my-template\html\com_hikashop\checkout\cart.php

I have created some Custom fields for Products
During selecting Options for the product everything is OK, all fields are editable.




But my customers wants also to correct some Options later during Checkout in the Cart-Display
screenshot:

so my question:
which PHP-files do i have to change (customize) for this special issue
For this special Project i have already made some changes in the Views:
(only the duplicates in my template)

templates\my-template\html\com_hikashop\product\show_block_custom_item.php
templates\my-template\html\com_hikashop\checkout\cart.php

Can i use the php-code from show_block_custom_item.php also in the cart.php ?

Thank you for your help!

Attachments:

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

  • Posts: 26249
  • Thank you received: 4039
  • MODERATOR
10 years 4 months ago #186768

Hi,

Well, about the view yes, it is the "checkout | cart" one.

But, even if you modify the view in order to display the custom field as editable ; you also need to add some code to handle the modification in the cart.
The checkout cart just send quantities under the format " item[XX] " (when XX is the cart product id) ; so you will need to add some code to also handle the modification of the custom fields.
You can use the trigger "onBeforeCartUpdate" to do so.

I hope it will help you.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

Time to create page: 0.083 seconds
Powered by Kunena Forum