show variation name in cart

  • Posts: 102
  • Thank you received: 0
13 years 6 days ago #29595

i have a cart selling different pound ranges of turkey 10-12, 14-16 etc

the main name of the product is say

joes turkeys (3.99lb)

we didnt want the variations to show with the name because then you come into a page that says:
joes turkeys (3.99lb) - 8-10lb

which is confusing since there are many size options. so i named each variant "joes turkeys (3.99lb)"
so when you pick a variant it always says that.

BUT then when you go to the cart it doesnt show which variant the person chose.
is there a way to grab that info in the cart?

thanks, Liz

so if i turn on add characteristic to title .. that passes the value to the cart and then i can hide the charactersitic in the name on the product page with CSS. BUT there is a : in the name...
joes turkeys: characteristic.

where can i edit that colon out??
thanks!

Last edit: 13 years 6 days ago by MinnieMouse. Reason: more info

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

  • Posts: 82818
  • Thank you received: 13361
  • MODERATOR
13 years 6 days ago #29613

Indeed you found the solution.
For the : at the end, the only solution for now if you don't want it is to change the code:
$variant->product_name = $variant->main_product_name.': <span class="hikashop_product_variant_subname">'.$variant->characteristics_text.'</span>';
to:
$variant->product_name = $variant->main_product_name.': <span class="hikashop_product_variant_subname">'.$variant->characteristics_text.'</span>';
in the file administrator/components/com_hikashop/classes/product.php

We'll look at a solution to avoid modifying directly the file for next release.

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

  • Posts: 102
  • Thank you received: 0
13 years 6 days ago #29617

thanks!

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

  • Posts: 43
  • Thank you received: 1
12 years 5 hours ago #76937

Hello Nicolas,

This "problem" seems to be remaining. Indeed the code is the same line 1051 and I see no solution but removing manually the ":" in product.php.
Unfortunatly, I guess that next Hikashop update will remove this hack...

Can't you add a language string for the separator instead of the colon ?

Thank's in advance for your attention.

Last edit: 12 years 5 hours ago by cb75ter.

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

  • Posts: 13201
  • Thank you received: 2322
12 years 57 minutes ago #77029

Hi,

If you edit the view product in HikaShop > Display > Views, then you will not lose your changes when updating.
But I keep in mind your need.

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

  • Posts: 43
  • Thank you received: 1
12 years 35 minutes ago #77047

Hi Xavier,

Could you please tell me the exact name of the view you're talking about, because I can't find it.
Thanks in advance.

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

  • Posts: 13201
  • Thank you received: 2322
12 years 32 minutes ago #77049

The view is "product / show_default" but there is no more ":" to separate the main name and the characteristic.

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

  • Posts: 43
  • Thank you received: 1
12 years 9 minutes ago #77058

Xavier,

Je ne suis pas sûr que nous nous comprenions bien.

Vous dîtes que les deux points n'existent plus dans la vue que vous me suggérez d'éditer.

Pourtant, ces deux points existent bien en front end dans la vue panier si je ne les supprime pas dans le fichier administrator/components/com_hikashop/classes/product.php
Est-il possible d'overrider cette vue ? Et dans le cas contraire, j'en reviens à ma suggestion de départ, d'intégrer une variable langue à la place des deux points en dur dans une future version d'Hikashop.

Vincent

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

  • Posts: 26152
  • Thank you received: 4027
  • MODERATOR
11 years 11 months ago #77118

Hi,

I modified the class product like Nicolas has suggested.
Here's the code

$separator = JText::_('HIKA_VARIANT_SEPARATOR');
if($separator == 'HIKA_VARIANT_SEPARATOR')
	$separator = ': ';
$variant->product_name = $variant->main_product_name.'<span class="hikashop_product_variant_subname">'.$separator.$variant->characteristics_text.'</span>';
This modification would be include in the next package of HikaShop.

Best 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.
Last edit: 11 years 11 months ago by Jerome.
The following user(s) said Thank You: cb75ter

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

  • Posts: 43
  • Thank you received: 1
11 years 11 months ago #77242

Perfect !
Thank you.

Vincent

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

Time to create page: 0.093 seconds
Powered by Kunena Forum