Title of variant is wrong

  • Posts: 86
  • Thank you received: 3
9 years 8 months ago #223817

-- HikaShop version -- : 2.6.0
-- Joomla version -- : 3.4.5
-- PHP version -- : 5.6.16
-- Browser(s) name and version -- : All

Hi

I have a product with 72 different variants.
When choosing the variant using the 4 characteristics the name of the product is created automatically using the values from the characteristics. But i have entered a specifik name for each variant, and that is not shown.

Am I missing something ?

/picht

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

  • Posts: 84233
  • Thank you received: 13674
  • MODERATOR
9 years 8 months ago #223891

Hi,

Is that only on the product page ? On the Checkout too ?
Do you have the same issue if you switch temporarily to the protostar Joomla template ?
Could you give a direct link to that product page so that we can see that ?

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

  • Posts: 86
  • Thank you received: 3
9 years 8 months ago #223896

Hi

That is on both product page and checkout
Protostar: I will have to check that on a test-site
www.justcoins.dk/dk-logo-sticker

regards
Picht

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

  • Posts: 86
  • Thank you received: 3
9 years 8 months ago #223920

Hi

Using protostar makes no difference...

Regards
Picht

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

  • Posts: 84233
  • Thank you received: 13674
  • MODERATOR
9 years 8 months ago #223925

Hi,

Try adding the line:
if(!empty($variant->variant_name)) $variant->characteristics_text = $variant->variant_name;
before the line:
$variant->product_name = $variant->main_product_name.'<span class="hikashop_product_variant_subname">'.$separator.$variant->characteristics_text.'</span>';
in the file administrator/components/com_hikashop/classes/product.php

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

  • Posts: 86
  • Thank you received: 3
9 years 8 months ago #224095

Great

That worked.

Will it be incorporated in the future updates ?

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

  • Posts: 84233
  • Thank you received: 13674
  • MODERATOR
9 years 8 months ago #224105

Yes

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

  • Posts: 99
  • Thank you received: 8
  • Hikashop Business
9 years 6 months ago #228750

Afternoon Nicolas,

with your modification this will display the variant sub name as entered manualy in the corresponding variants.

Would it be possible to replace the product main name with the variant sub name?

At this moment it will display main name followed by the sub name, or am I doing something wrong?

Regards, Rene

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

  • Posts: 99
  • Thank you received: 8
  • Hikashop Business
9 years 6 months ago #228758

I think that I did look at it the wrong way.

If the main product name is Patch cable Cat5e then the variant name should be Red 0.25m and not Patch cable Cat5e Red 0.25m

So you would end up with: Patch cable Cat5e Red 0.25m

Only problem is that it will not load the default variant sub name, have to look at that.

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

  • Posts: 99
  • Thank you received: 8
  • Hikashop Business
9 years 6 months ago #228793

Found that as well in another reply by Nicolas:

Remove the code:

if (hikashop_getCID('product_id')!=$this->element->product_id && isset ($this->element->main->product_name))
echo $this->element->main->product_name;
else

in the file show_default via the menu Display>Views and that should do it.

Very happy with the result :cheer:

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

Time to create page: 0.080 seconds
Powered by Kunena Forum