Populating Variant Custom Fields

  • Posts: 513
  • Thank you received: 8
  • Hikashop Business
5 years 9 months ago #294522

-- HikaShop version -- : 3.4
-- Joomla version -- : 3.8.10
-- PHP version -- : 5.3
-- Browser(s) name and version -- : Firefox

Hi, Can you advise of a way to auto populate variant custom fields in products? when making changes to fields like product code in product this auto updates the variants but making changes to custom fields does not even populate the variant custom fields never mind make changes?

thanks

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

  • Posts: 12953
  • Thank you received: 1778
5 years 9 months ago #294524

Hello,

There is no option to automatically populate variant custom fields. However, you can eventually use mass actions via "Hikashop->System->Mass actions", to apply values to custom fields of your product variants.

www.hikashop.com/support/documentation/167-massaction-form.html

Best regards,
Mohamed Thelji.

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

  • Posts: 513
  • Thank you received: 8
  • Hikashop Business
5 years 9 months ago #294595

Hi Mohamed,

Ok so that's not possible! therefore as the variants would only be replicated as to the populated custom fields on the main product page, is there a way to display what is in the custom fields in the main page instead of the variants?

Rgds

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

  • Posts: 81539
  • Thank you received: 13069
  • MODERATOR
5 years 9 months ago #294612

Hi,

If you don't enter anything in the custom field of the variants, it will automatically use the value from the main product instead. There is nothing particular to do for that besides not filling the custom fields in the variants.

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

  • Posts: 513
  • Thank you received: 8
  • Hikashop Business
5 years 9 months ago #294649

Hi Nicolas,

Let me try to explain what I am trying to do.
I have created a custom field,SKU. This is used to populate the manufacturer's SKU as we use our own which is in the 'product code'.
The 'product code' works fine correctly populating in the products variants. Even though the SKU is populated it does not show in the variants and would have to be entered manually which is very time consuming. If the SKU in the main product was read by the 'order' then that would be ok as its the same SKU that would be on all of the variants. At present it seems only the empty (or populated) SKU in the variant is shown in the backend order.

What I am trying to achieve is for the custom field SKU in the 'main' product page to be shown in the order instead of the variant SKU.
I have attached files and hope this is a little more clear.

Attachments:

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

  • Posts: 81539
  • Thank you received: 13069
  • MODERATOR
5 years 9 months ago #294651

HI,

That does happen on the product page on the frontend, where you usually want to display the product custom fields.
In the order/invoice however, it's the direct value of the variant itself which is used. So if you have the value in the main product, it won't be used there.
That's the normal behavior.
If you want to change that, you need to edit the code of the view which displays the custom field in the order and modify the code to load the data of the main product with a MySQL query, etc. A PHP developer can change that for you.

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

Time to create page: 0.083 seconds
Powered by Kunena Forum