Я использую joomla 2.5 и virtuemart 2. Я попытался повторить скрипт, который построен из php. Таким образом, внутри файла корзины внутри функции foreach, которая проходит через каждый продукт, мне нужно сохранить переменный идентификатор продукта, количество и цену продажи.Echo цена продукта в виртуозной корзине
Я могу показать идентификатор и количество продукции, как это:
$wantedproductid = $product->virtuemart_product_id;
$wantedproductquantity = $product->quantity;
, но у меня есть проблема с ценой. Я повторил $this
и я получаю это:
VirtueMartCart Object
(
[products] => Array
(
[812] => stdClass Object
(
[virtuemart_manufacturer_id] => 11
[slug] => hill-s-puppy-healthy-development-large-breed-koutavia-anaptyksi-kotopoulo-11kg
[published] => 1
...
...
[pricesUnformatted] => Array
(
[basePrice] => 70.6
[basePriceWithTax] => 0
[discountedPriceWithoutTax] => 60.31
[salesPrice] => 60.31
[taxAmount] => 0
[salesPriceWithDiscount] => 60.31
[discountAmount] => 57.4
[priceWithoutTax] => 70.6
[subTotalProducts] => 0
[2Diff] => -9.585
[812] => Array
(
[costPrice] => 63.90000
[basePrice] => 63.9
[basePriceVariant] => 63.9
[basePriceWithTax] => 0
[discountedPriceWithoutTax] => 54.32
[priceBeforeTax] => 63.9
[salesPrice] => 54.32
[taxAmount] => 0
[salesPriceWithDiscount] => 54.32
[salesPriceTemp] => 54.32
[unitPrice] => 0
[discountAmount] => 14.99
[priceWithoutTax] => 63.9
[variantModification] => 0
...
...
Что мне нужно, например, это значение: [salesPrice] => 54.32
Как я могу сохранить [salesPrice]
в стоимости?
Благодарим за помощь! Правильный ответ: $ product-> product_price –