Default product title for variants

  • Posts: 21
  • Thank you received: 0
11 years 9 months ago #126628

-- url of the page with the problem -- : www.aswellascanbe.com/bobje/index.php/winkel
-- HikaShop version -- : 2.2.2 Business
-- Joomla version -- : 3.1.5
-- PHP version -- : 5.3.2
-- Browser(s) name and version -- : FireFox 24.0

Hi there!

In my test shop (see URL above) I created a product called "Jas 1" with 3 color variants. The main product is named "Jas 1" and (with "Manage Variants") I named the variants "Jas (Groen)", "Jas (Blauw)" and "Jas (Zwart)". The default variant is "Jas (Groen)".

Now when you enter the product detail page, it shows the name "Jas 1" while in my opinion it should show the name of the default variant: "Jas (Groen)".

When you now select one of the variants, the displayed product name correctly changes to (for instance) "Jas (Blauw)".

The same story goes for when I switch the option "Show default variant" to "Yes" in the main configuration...

Is this a small bug?

Thanks for all the good work guys,
Great product!

Peter

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

  • Posts: 26256
  • Thank you received: 4041
  • MODERATOR
11 years 9 months ago #126685

Hi,

Yes the first product variant is not load completely in the product page and the name of the product which is display is the name of the main product.
Because it is the name which is displayed in the product list, we didn't want to display a different name when the user open the product page, it could be confusing. But I understand that you want to display the first product variant name, with a little view override you can change it (in the "product | show_default" view).

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.
The following user(s) said Thank You: peteritv

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

  • Posts: 21
  • Thank you received: 0
11 years 9 months ago #126806

OK, not a big problem, so I'll leave it be for now.

Thanks Jerome

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

  • Posts: 5
  • Thank you received: 0
9 years 8 months ago #219939

I know this is an old thread but I actually want to display the variant name when the product detail page was first loaded up. What code do I change in the "product | show_default" view?

Thanks!

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

  • Posts: 84079
  • Thank you received: 13629
  • MODERATOR
9 years 8 months ago #220002

Hi,

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.

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

  • Posts: 5
  • Thank you received: 0
9 years 8 months ago #220030

Thanks Nicolas,
I have removed the code in line 14 (or 15) but it still does not work? The website is at westcoastbamboo.com.au/en/online-store/p...100-bamboo-sheet-set


Thanks

Goldian

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

  • Posts: 84079
  • Thank you received: 13629
  • MODERATOR
9 years 8 months ago #220035

Hi,

You're not using the "default" layout but the "tabular" layout.
So in that case, you need to do the same change but in the file "show_tabular" and not in "show_default".

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

  • Posts: 28
  • Thank you received: 0
9 years 1 month ago #241705

Hello,

I have a little problem adding text in the product_show_default page. I want to add a texte under the price, which I did pretty easily with the show_defaut.php. But when I chose another variant (a different color) of my product, my extra text disapear !

Product page :



Variant product page :



Can you help me on this ?

Thanks !

Last edit: 9 years 1 month ago by AntinJH.

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

  • Posts: 84079
  • Thank you received: 13629
  • MODERATOR
9 years 1 month ago #241716

Hi,

That's normal. You also need to do the change in the "show" file of the "product" view for the variants data.

The following user(s) said Thank You: AntinJH

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

  • Posts: 28
  • Thank you received: 0
9 years 1 month ago #241872

Perfect. Thanks !

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

Time to create page: 0.122 seconds
Powered by Kunena Forum