-- HikaShop version -- : 2.4.1
-- Joomla version -- : 3.3.6
Hello
My shop is a distributors-only catalog.
I dont use the cart functionalities ( except wishlist)
all logged users have to mention a VAT number
For each product, i put 2 differents prices :
- The real price is visible only for logged pro users ( i made an access level for the group "privilegied")
- The price have to be shown in an encoded form for the guests
For now, i just use a "tip" for that : i put the normal price for privilegied, and i use a prefix (1111) before the price for the guests. I made a small script on the product/listing_price view :
if(substr(strval(intval($price->price_value)), 0, 4) == '1111'){
$decoded = array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9");
$encoded = array("U", "P", "A", "N", "C", "H", "T", "O", "R", "K");
echo str_replace($decoded, $encoded, substr(strval(intval($price->price_value)),4)
);
It works fine but its really dirty for 3 reasons :
- Its badly ugly
- If one of my product , for exemple, is normally sold 1111 $ ( which is unprobable i admit), the encoded version will display nothing
- i always have to write 1111 before the guestt price into the back office, and the admin product listing give me headache
I wonder if there is a way to call ( and test) the group id of my price owner from the product/listing_price view. Then i would be able to recognize the guest prices, and i wouldnt be forced to put a prefix on my prices.
Thanks