Forums / Setting Up Categories, Products, Attributes / Itemize Attribute prices in shopping cart

Itemize Attribute prices in shopping cart

Locked

Views: 2,290

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
10 Apr 2007, 6:09 PM
#1
cbrknight avatar

cbrknight

New Zenner

Join Date:
Mar 2007
Posts:
20
Plugin Contributions:
0

Itemize Attribute prices in shopping cart

Is there a way to have multiple attributes display in an itemized list when you add it to the shopping cart?

Right now there is just a box with the different attributes that were chosen but the additional charges for those attributes are added together.

Thanks

10 Apr 2007, 8:25 PM
#2
masterblaster avatar

masterblaster

Totally Zenned

Join Date:
Aug 2004
Location:
Germany
Posts:
528
Plugin Contributions:
0

Re: Itemize Attribute prices in shopping cart

You could always make your base product cost nothing and make an attribute selection required Then any attribute charges would make up a product.

In case you want a radio or checkbox field instead of a dropdown menu, change the type in the zen admin -> attribute names controller

I hope I understood your question correctly, if not, please explain a bit more...

10 Jul 2009, 9:12 PM
#3
sitehatchery avatar

sitehatchery

New Zenner

Join Date:
Mar 2007
Posts:
77
Plugin Contributions:
0

Re: Itemize Attribute prices in shopping cart

This was a long time ago, but it's top of google for "zen cart itemize attributes", so I'll give a fix here:

tpl_shopping_cart_default.php

Comment out:

<li><?php echo $value['products_options_name'] . TEXT_OPTION_DIVIDER . nl2br($value['products_options_values_name']); ?></li>
 
``` and insert this:

if((int)$value['options_values_price']){ $price=money_format('%i', $value['options_values_price'] ); }
if($price){ $display_price=" (".$value['price_prefix'] . " $" . $price . ")"; }
echo '<li>' . $value['products_options_name'] . TEXT_OPTION_DIVIDER . nl2br($value['products_options_values_name']) . $display_price . '</li>';

on includes/classes/order.php, comment out:

$this->products_ordered_attributes .= "\n\t" . $attributes_values->fields['products_options_name'] . ' ' . zen_decode_specialchars($this->products[$i]['attributes'][$j]['value']);

if((int)$this->products[$i]['attributes'][$j]['price']){
$price=money_format('%i',$this->products[$i]['attributes'][$j]['price']);
$display_price=" (".$this->products[$i]['attributes'][$j]['prefix'] . " $" . $price . ")";
}
$this->products_ordered_attributes .= "\n\t" . $attributes_values->fields['products_options_name'] . ' ' . zen_decode_specialchars($this->products[$i]['attributes'][$j]['value'] . $display_price);