Hi again,
You have been helpful so far but now I need some additional functionality.
I tried your suggestion of replacing $product->amount with $_SESSION which pulls from a drop-down menu as shown in code below:-
<?php
jimport('joomla.plugin.plugin');
class plgSystemCustom_price extends JPlugin{
}
function hikashop_product_price_for_quantity_in_cart(&$product){
$currencyClass = hikashop_get('class.currency');
$quantity = @$product->cart_product_quantity;
if(empty($product->prices)){
$price= null;
$price->price_currency_id = hikashop_getCurrency();
$price->price_min_quantity = 1;
$product->prices = array($price);
}
if(!empty($_SESSION)){
foreach($product->prices as $k => $price){
$product->prices[$k]->price_value = $_SESSION;
$product->prices[$k]->price_value_with_tax = $_SESSION;
}
}
$currencyClass->quantityPrices($product->prices,$quantity,$product->cart_product_total_quantity);
}
function hikashop_product_price_for_quantity_in_order(&$product){
$quantity = $product->order_product_quantity;
if(!empty($product->ordered_length)){
$product->order_product_price = $_SESSION;
$product->order_product_tax = 0;
}
$product->order_product_total_price_no_vat = $product->order_product_price*$quantity;
$product->order_product_total_price = ($product->order_product_price+$product->order_product_tax)*$quantity;
}
I would now like to update this code so that if the session variable is not selected from the drop-down list, the $product->amount which I created on the HikaShop-->Products page will be used instead.
Thank You again