Custom fields from checkout on invoice

  • Posts: 8
  • Thank you received: 0
10 years 1 month ago #174866

-- HikaShop version -- : 2.3.3
-- Joomla version -- : 2.5.27

We have a number of custom fields that show up for each cart item at checkout.
How can we add these custom fields to the order product table on checkout so they can be displayed on the invoices?

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

  • Posts: 82864
  • Thank you received: 13372
  • MODERATOR
10 years 1 month ago #174883

Hi,

That should already be the case.
Can you provide a screenshot of an invoice ?
Did you customize the invoice with a previous version of HikaShop ?
If you did, then that would explain why you don't see them in the invoice. In that case, reverting your changes and applying them to the new version of the invoice would certainly help.

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

  • Posts: 8
  • Thank you received: 0
10 years 1 month ago #174994

We have the custom fields but we are trying to write to them through php.
The customization we added is in the hikashop_cart_product table and we need to write those to the custom fields in the order table through php so that way they show up in the invoice. We just cannot figure out what id's to grab or what links the order table with the cart product table.

Also, is there a way to display items individually rather than combined in the cart view. Right now - Hikashop combines 2 same items as one with a quantity of 2. Can we explode this to show each item separated in the cart so our custom fields can be applied to both?

Here is a screenshot of the cart right now.

Attachments:

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

  • Posts: 82864
  • Thank you received: 13372
  • MODERATOR
10 years 1 month ago #175043

You have all these issues because you're not using standard custom item fields. If you did, you would see the fields on the product page, and if you would add a product with different custom item field values to the cart, it would automatically be saved as a second entry instead of being lumped together with the same product already in the cart. You would also not have to save the fields from the cart_product table to the order_product table upon order creation as it would be done by hikashop for you.
All left for you would be to customize the cart view file to have these fields to be able to update the values of the fields for each product in the cart.

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

  • Posts: 8
  • Thank you received: 0
10 years 1 month ago #175059

Nicolas,

We were able to get it to work with custom fields as you advised.

Still curious if there is a way to make items not group together at all in the cart. For example - If I add 2 of the same item, they appear as two individual items in the cart rather than one item with a quantity of 2.

I appreciate the help so far and really enjoy the product - very clean and expandable.

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

  • Posts: 8
  • Thank you received: 0
10 years 1 month ago #175159

Let me rephrase - We need to separate the items in the cart instead of combining them by quantity. (ie. Product 12345, Product 12345 instead of Product 12345 Quantity 2) We just need to know what to change and where to change it. We are currently looking in “administrator/components/com_hikashop/classes/cart.php”. We have separate “Gift To” address custom fields for the items in the cart view and can not have them in the product listings. We are comfortable with PHP and making adjustments to the code - we are just uncertain where to look.

Last edit: 10 years 1 month ago by quantuscreative.

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

  • Posts: 8
  • Thank you received: 0
10 years 1 month ago #175193

Nevermind - We found the on/off in the administrator/components/com_hikashop/classes/cart.php.

Thanks for the help with the custom fields!

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
10 years 1 month ago #175194

Hi,

No problem.

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.075 seconds
Powered by Kunena Forum