Custom field not displaying when changing to variant

  • Posts: 37
  • Thank you received: 3
4 years 11 months ago #317163

-- url of the page with the problem -- : kaldiboz.nl/shop/koffiebonen/
-- HikaShop version -- : 4.2.3
-- Joomla version -- : 3.9.16
-- PHP version -- : 7.3.15
-- Browser(s) name and version -- : Checked in Chrome / Firefox / Edge
-- Error-message(debug-mod must be tuned on) -- : No error message

Hi,

Just discovered this issue with no solution for it (yet).

Issue is simple:
I have a product (coffee).
Standard via = coffee
From standard view I can select another option (weight)
As soon as I do this, they custom field(s) are gone. Same if I switch back to original amount. Only refreshing page helps.

Any clues?

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

  • Posts: 83409
  • Thank you received: 13502
  • MODERATOR
4 years 11 months ago #317175

Hi,

That's probably because you didn't set these custom fields in your variants, only in the main product.
What you can do is to edit the file product / show.php for your frontend template via the menu Display>Views and change the line:
if(!empty($this->fields)) {
to:
if(false) {
That way, the value of the custom fields in the variants won't be taken into account and that area won't refresh when you select a variant.

The following user(s) said Thank You: Robby

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

  • Posts: 37
  • Thank you received: 3
4 years 11 months ago #317203

That works!

The following user(s) said Thank You: Philip

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

Time to create page: 0.056 seconds
Powered by Kunena Forum