- Posts: 22
- Thank you received: 0
main product
9 years 1 week ago #281335
by behvandi
main product was created by behvandi
-- HikaShop version -- : 3.2.0
-- Joomla version -- : 3.8.1
-- PHP version -- : 7
-- Browser(s) name and version -- : firefox57
Hello
I want get main product price in php override
I create some variant and getting variant price with format by code:
I need get main product price that is no variant
this price is with tax
please tell me how I can get main product price with format and currency unit and seprator such as above code
thanks
-- Joomla version -- : 3.8.1
-- PHP version -- : 7
-- Browser(s) name and version -- : firefox57
Hello
I want get main product price in php override
I create some variant and getting variant price with format by code:
Code:
echo $this->currencyHelper->format(@$price->price_value_with_tax,$price->price_currency_id);
this price is with tax
please tell me how I can get main product price with format and currency unit and seprator such as above code
thanks
Please Log in or Create an account to join the conversation.
9 years 6 days ago #281346
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic main product
Hello,
When your "element" is a variant, you can access to its parent prices with :
Please note that "prices" is an array of prices and you need to perform a loop on them or just take the first element (with "reset()") in order to be able to use the code you posted.
Regards,
When your "element" is a variant, you can access to its parent prices with :
Code:
$this->element->main->prices
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
9 years 6 days ago #281394
by behvandi
Replied by behvandi on topic main product
Thanks
Please Log in or Create an account to join the conversation.
Time to create page: 0.069 seconds