custom_attribute.info------------
core = "6.x"
dependencies[] = "uc_cart"
description = "Ubercart product attributes custom"
name = "Ubercart product attributes custom"
version = "6.x-1.0"
<?php
function custom_attribute_cart_item($op, &$item)
{
if ($item->nid =="44")
{
switch ($op)
{
case 'load':
$height = $item->data[attributes][18];
$width = $item->data[attributes][19];
$frame = $item->data[attributes][20];
$text = $item->data[attributes][22];
$first_check_thirtysix = $item->data[attributes][8];
//$sec_check_seventyfive = $item->data[attributes][8][9];
$third_check_nine = $item->data[attributes][15];
$qty_check_nine = $item->data[attributes][31];
$hight_width= $height + $width;
if($hight_width <= 35)
{
$first= $hight_width * 2.25 * .5;
$price_per_frame = $first+ 39;
$first_price = $price_per_frame;
}else{ $first_price=0; }
if($hight_width >= 36 && $hight_width <= 59 )
{
$first_sec= $hight_width * 2.25 * .85;
$price_per_frame_sec = $first_sec+ 49;
$first_price_sec = $price_per_frame_sec;
}else{ $first_price_sec=0; }
if($hight_width <= 90 && $hight_width>= 60)
{
$first_third= $hight_width * 2.25;