Hi,
1. If you know a bit of PHP it's easy to change the plugin to avoid that.
For example, instead of directly using the value like the plugin does now with the code:
switch($taxes){
case 2:
$product->prices[$k]->price_value = $currencyClass->getUntaxedPrice(hikashop_toFloat($product->$column),hikashop_getZone(),$product->product_tax_id);
$product->prices[$k]->taxes=$currencyClass->taxRates;
$product->prices[$k]->price_value_with_tax = hikashop_toFloat($product->$column);
break;
case 1:
$product->prices[$k]->price_value = hikashop_toFloat($product->$column);
$product->prices[$k]->price_value_with_tax = $currencyClass->getTaxedPrice(hikashop_toFloat($product->$column),hikashop_getZone(),$product->product_tax_id);
$product->prices[$k]->taxes=$currencyClass->taxRates;
break;
case 0:
default:
$product->prices[$k]->price_value = hikashop_toFloat($product->$column);
$product->prices[$k]->price_value_with_tax = hikashop_toFloat($product->$column);
break;
}
, you could do it like that:
switch($product->$column){
case 'first':
$value = 18.99;
break;
case 'second':
default:
$value = 28.99;
break;
}
switch($taxes){
case 2:
$product->prices[$k]->price_value = $currencyClass->getUntaxedPrice(hikashop_toFloat($value),hikashop_getZone(),$product->product_tax_id);
$product->prices[$k]->taxes=$currencyClass->taxRates;
$product->prices[$k]->price_value_with_tax = hikashop_toFloat($value);
break;
case 1:
$product->prices[$k]->price_value = hikashop_toFloat($value);
$product->prices[$k]->price_value_with_tax = $currencyClass->getTaxedPrice(hikashop_toFloat($value),hikashop_getZone(),$product->product_tax_id);
$product->prices[$k]->taxes=$currencyClass->taxRates;
break;
case 0:
default:
$product->prices[$k]->price_value = hikashop_toFloat($value);
$product->prices[$k]->price_value_with_tax = hikashop_toFloat($value);
break;
}
And thus, that would only allow the values "first" and "second" in the custom field for the override of the price of the product.
2. and 3. If the avalailable choices have to be tied to the quantity selected, I would recommend to also use a custom item field for the selection of the quantity (and turn off the display of the quantity input field in the HikaShop configuration) and use the "display limited to" setting of your custom fields in order to display different fields based on what is selected in the first one. Then, in your price override (donation) plugin, you can take the custom fields values and based on them, set the price you want for the product.