Skip to content
Snippets Groups Projects
Commit 0bf55dac authored by Reinhold Kainhofer's avatar Reinhold Kainhofer
Browse files

Version 3.1: Added SKUs variable

parent 3a3f8c06
No related branches found
No related tags found
No related merge requests found
No preview for this file type
No preview for this file type
......@@ -415,6 +415,14 @@ class plgVmShipmentRules_Shipping_Base extends vmPSPlugin {
return $dimensions;
}
function getOrderSKUs (VirtueMartCart $cart) {
$skus = array();
foreach ($cart->products as $product) {
$skus[] = $product->product_sku;
}
return $skus;
}
function getOrderCountryState (VirtueMartCart $cart, $address) {
$data = array (
'countryid' => 0, 'country' => '', 'country2' => '', 'country3' => '',
......@@ -473,6 +481,8 @@ class plgVmShipmentRules_Shipping_Base extends vmPSPlugin {
'salespricewithdiscount'=>$cart_prices['salesPriceWithDiscount'],
'discountamount'=>$cart_prices['discountAmount'],
'pricewithouttax'=>$cart_prices['priceWithoutTax'],
'skus'=>$this->getOrderSKUs($cart),
// 'discountbeforetaxbill'=>$cart_prices['discountBeforeTaxBill'],
);
......@@ -483,6 +493,7 @@ class plgVmShipmentRules_Shipping_Base extends vmPSPlugin {
$this->addCustomCartValues($cart, $cart_prices, $cartvals);
// JFactory::getApplication()->enqueueMessage("<pre>cart prices: ".print_r($cart_prices,1)."</pre>", 'error');
// JFactory::getApplication()->enqueueMessage("<pre>cart: ".print_r($cart,1)."</pre>", 'error');
// JFactory::getApplication()->enqueueMessage("<pre>cart values: ".print_r($cartvals,1)."</pre>", 'error');
return $cartvals;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment