Variant names in product title

  • Posts: 209
  • Thank you received: 18
14 years 3 weeks ago #2960

I have a product that has two characteristics:

Product X
Characteristics


Variants
How many days hire?----1, 2 or 3 (in a drop down box)
Which interface?
PS2, XBox (in a drop down box)

When I view product X in the first instance, the product title says "Product X 1 PS2". I'm assuming it is picking up the first variants for each characteristic as the product title changes when different variants are selected.

It looks very confusing to the buyer when the product name shows a pre-selected variant. I have tried adding a variant called "--" to the characteristic. This sort of works, I now see a default product title as "Product X -- --" but it's starting to look very messy. Also, when the variants are numbers, the product title starts to look weird especially if you have a lot of characteristics. eg: Product X 1 PS2 3 5 7

Is there a way to:
Show just the product name without the variant name?
or
Set a default variant that is blank and then force the user to choose a valid variant?

cheers!

Last edit: 14 years 3 weeks ago by JIK.

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

  • Posts: 83041
  • Thank you received: 13405
  • MODERATOR
14 years 3 weeks ago #2971

Hi,

Yes and yes.

The first option is the easiest: on the product edition screen you have a button "manage variants" in the characteristics area. Upon clicking on it, you will get the listing of variants of your product. You can just edit each one and set a product name for each. That will override the product name auto completion system which adds the characteristics values to the main product name.

For the second: You indeed can add fake values to your characteristics. Instead of -- you could used   that will be replaced automatically by a space by your browser. Then, edit the variants with those values ( you should have 6 variants with a   in it ) and set the quantity to 0. That way those variants won't be available for sale. You might also want to change the text "no stock" to "please select your options" in the configuration under the tab languages by editing your translation file.

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

  • Posts: 209
  • Thank you received: 18
13 years 11 months ago #6234

Hi Nicolas,

The first option does not work for me because it removes the variant names completely - eg: from the shopping cart view etc.

I was able to create a "fake" variant using the   but when I click on manage variants the fake is not available for editing.

Any ideas?

cheers!

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

  • Posts: 209
  • Thank you received: 18
13 years 11 months ago #6235

Oops! Ignore that post. In creating the fake variant I forgot to re-add the characteristics and save!!! Duh!!

Works now!

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

  • Posts: 209
  • Thank you received: 18
13 years 11 months ago #6236

Okay, got the fake variant working but now when I select a valid variant and add to the cart - nothing is added to the cart.

???

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

  • Posts: 83041
  • Thank you received: 13405
  • MODERATOR
13 years 11 months ago #6240

Could you post a link that that product page ?

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

  • Posts: 209
  • Thank you received: 18
13 years 11 months ago #6280

Hi Nicolas, my store is not live yet so I have sent you a link via email. Cheers and thanks

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

  • Posts: 83041
  • Thank you received: 13405
  • MODERATOR
13 years 11 months ago #6286

Do you have some cache activated in joomla ?
docs.joomla.org/Cache


Also, it seems that you edited some of the views. Since we worked on the "add to cart" button for last release, if you made modifications to the views of the product page, you are using old views with the new code and it might be the reason why it's not working. I would recommend to save the folder templates/YOUR_TEMPLATE/html/com_hikashop to another folder so that all the modifications are removed and see if it works. If so then, it's indeed because of that. You should try to pinpoint in which file it is (probably the quantity or the show file) and reapply your modifications to the new versions of the view(s).

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

  • Posts: 209
  • Thank you received: 18
13 years 11 months ago #6290

Thanks Nicolas, I'm not using any cache (never do on sites with stores) and I try not to touch any of the view files. In the link I sent, this product is the only one that I have set the fake variant on. If you go to any of the other products (such as the additional options at the bottom) they will add to the cart without problems.

I'll give your suggestion a go and will update the software to see if it works.

Thanks!

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

  • Posts: 209
  • Thank you received: 18
13 years 11 months ago #6296

Yay! Updating the software fixed it!! Fabulous!!

Many many thanks Nicolas, you're the best!

cheers

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

  • Posts: 16
  • Thank you received: 0
13 years 6 months ago #17630

hi Nicolas, I have now downloaded the 1.5.1 version and would like to remove the variant info from the title as well.
both solutions you proposed imply a huge amount of rework for me as I have hundreds of variants for each product.
I was wondering if I could disable the visualization of the variant in the title on the code side?

thanks
Cristiano

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

  • Posts: 83041
  • Thank you received: 13405
  • MODERATOR
13 years 6 months ago #17632

Sure. You can go in the menu Display->Views and edit the file show of the view product. There, you can just remove the lines:
<div id="hikashop_product_name_<?php echo $variant_name;?>" style="display:none;">
<?php echo $variant->product_name;?>
</div>
and then change the line:
echo $this->element->product_name;
to:
echo $this->element->main->product_name;

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

  • Posts: 16
  • Thank you received: 0
13 years 6 months ago #17644

thanks
would this change remove the variant name also from the cart?

thanks
Cristiano

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

  • Posts: 83041
  • Thank you received: 13405
  • MODERATOR
13 years 6 months ago #17648

no. But if you just want the main product name everywhere, why not just leave the variant name empty and turn off the option "Append characteristics value to product name" of the configuration ?

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

  • Posts: 16
  • Thank you received: 0
13 years 6 months ago #17651

HI Nicolas,
I want the variant name in the cart, so people are sure they bought the right variant. what I dont want is that people get confused reading the product title and beleive there is just a variant (before scrolling down on the product page).
So your mod is perfect in my case

thanks!!!
CC

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

  • Posts: 42
  • Thank you received: 1
13 years 2 months ago #27965

nicolas wrote:

Sure. You can go in the menu Display->Views and edit the file show of the view product. There, you can just remove the lines:
<div id="hikashop_product_name_<?php echo $variant_name;?>" style="display:none;">
<?php echo $variant->product_name;?>
</div>
and then change the line:
echo $this->element->product_name;
to:
echo $this->element->main->product_name;


Hi nicolas. After I have amended the following you mentioned, those products of mine which does not have any characteristics had their product names dissapear on product page. Please help. Thanks.

Currently, I have used back

echo $this->element->product_name;

while waiting for your help and the variants are still showing in product title.

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

  • Posts: 83041
  • Thank you received: 13405
  • MODERATOR
13 years 2 months ago #27984

Indeed, that's normal.
If you want both to work you should use instead the line:
echo (empty($this->element->main->product_name) ? $this->element->product_name : $this->element->main->product_name );

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

  • Posts: 42
  • Thank you received: 1
13 years 2 months ago #28021

Thank you very much, it is solved. :)

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

  • Posts: 12
  • Thank you received: 0
13 years 9 hours ago #33934

Hi, I would like to achieve the same thing but I think the code in product/show.php has changed since the last post.
What are the new codes to make this modification?

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

  • Posts: 83041
  • Thank you received: 13405
  • MODERATOR
12 years 11 months ago #33994

These pieces of code are still the same in the latest version of HikaShop.

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

Time to create page: 0.178 seconds
Powered by Kunena Forum