Author Topic: Change the way the attributes are shown in the cart  (Read 1533 times)

luckysoft

  • Beginner
  • *
  • Posts: 18
Change the way the attributes are shown in the cart
« on: December 30, 2010, 14:48:43 pm »
When adding a product to the cart it saves the label for the attribute and also the value of the attribute. Is it possible only to save the value and not the label and the value?

For example:

When i add a product to the basket it shows up like this:

1 x  Sample product
Prijs: ?1,00   
First option: Yes i want it
Second option: Give me one

But i want it to show up like this:

1 x  Sample product
Prijs: ?1,00   
Yes i want it
Give me one

I don't want the labels to be saved with the attribute, I understand that this effects the whole site but that is no problem.

pRemon

  • Beginner
  • *
  • Posts: 3
    • Nut Codes
Re: Change the way the attributes are shown in the cart
« Reply #1 on: September 02, 2011, 12:42:00 pm »
Hi, i hope this will help:

"remove attributes price from MINICART and leave only attribute property"

components\com_virtuemart\themes\default\templates\common\minicart.tpl.php

replace:
echo $cart['attributes'];

to:
$pieces=explode('(',$cart['attributes']);
echo $pieces[0]."<br/>";

example:
my attribute is 'Stk 5 (=Dkr 20.00)'
this will explode attribute in 2 peaces
$pieces[0] = Stk 5
$pieces[1] = =Dkr 20.00)
http://nutcodes.com - Joomla WordPress PHP JavaScript jQuery tutorials