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

Images for documentation (translating rule names)

parent 266d6b7e
No related branches found
No related tags found
No related merge requests found
images/plg_vmshipping_rules_shipping_translation.png

99.7 KiB

images/plg_vmshipping_rules_shipping_translation1.png

48.1 KiB

...@@ -776,20 +776,21 @@ class plgVmShipmentRules_Shipping_Base extends vmPSPlugin { ...@@ -776,20 +776,21 @@ class plgVmShipmentRules_Shipping_Base extends vmPSPlugin {
$data['discountamount'] = $cart_prices['discountAmount']; $data['discountamount'] = $cart_prices['discountAmount'];
$data['pricewithouttax'] = $cart_prices['priceWithoutTax']; $data['pricewithouttax'] = $cart_prices['priceWithoutTax'];
} else { } else {
// TODO: Calculate the prices from the individual products! // Calculate the prices from the individual products!
// Possible problems are discounts on the order total // Possible problems are discounts on the order total
foreach ($products as $product) { foreach ($products as $product) {
$data['amount'] = $product->allPrices[$product->selectedPrice]['salesPrice']; JFactory::getApplication()->enqueueMessage("<pre>Product: ".print_r($product,1)."</pre>", 'error');
$data['amountwithtax'] = $product->allPrices[$product->selectedPrice]['salesPrice']; $data['amount'] += $product->allPrices[$product->selectedPrice]['salesPrice'];
$data['amountwithouttax'] = $product->allPrices[$product->selectedPrice]['priceWithoutTax']; $data['amountwithtax'] += $product->allPrices[$product->selectedPrice]['salesPrice'];
$data['baseprice'] = $product->allPrices[$product->selectedPrice]['basePrice']; $data['amountwithouttax'] += $product->allPrices[$product->selectedPrice]['priceWithoutTax'];
$data['basepricewithtax'] = $product->allPrices[$product->selectedPrice]['basePriceWithTax']; $data['baseprice'] += $product->allPrices[$product->selectedPrice]['basePrice'];
$data['discountedpricewithouttax'] = $product->allPrices[$product->selectedPrice]['discountedPriceWithoutTax']; $data['basepricewithtax'] += $product->allPrices[$product->selectedPrice]['basePriceWithTax'];
$data['salesprice'] = $product->allPrices[$product->selectedPrice]['salesPrice']; $data['discountedpricewithouttax'] += $product->allPrices[$product->selectedPrice]['discountedPriceWithoutTax'];
$data['taxamount'] = $product->allPrices[$product->selectedPrice]['taxAmount']; $data['salesprice'] += $product->allPrices[$product->selectedPrice]['salesPrice'];
$data['salespricewithdiscount'] = $product->allPrices[$product->selectedPrice]['salesPriceWithDiscount']; $data['taxamount'] += $product->allPrices[$product->selectedPrice]['taxAmount'];
$data['discountamount'] = $product->allPrices[$product->selectedPrice]['discountAmount']; $data['salespricewithdiscount'] += $product->allPrices[$product->selectedPrice]['salesPriceWithDiscount'];
$data['pricewithouttax'] = $product->allPrices[$product->selectedPrice]['priceWithoutTax']; $data['discountamount'] += $product->allPrices[$product->selectedPrice]['discountAmount'];
$data['pricewithouttax'] += $product->allPrices[$product->selectedPrice]['priceWithoutTax'];
} }
} }
return $data; return $data;
...@@ -823,8 +824,7 @@ class plgVmShipmentRules_Shipping_Base extends vmPSPlugin { ...@@ -823,8 +824,7 @@ class plgVmShipmentRules_Shipping_Base extends vmPSPlugin {
// Finally, call the triger of vmshipmentrules plugins to let them add/modify variables // Finally, call the triger of vmshipmentrules plugins to let them add/modify variables
JPluginHelper::importPlugin('vmshipmentrules'); JPluginHelper::importPlugin('vmshipmentrules');
$dispatcher = JDispatcher::getInstance(); JDispatcher::getInstance()->trigger('onVmShippingRulesGetCartValues',array(&$cartvals, $cart, $products, $method, $cart_prices));
$dispatcher->trigger('onVmShippingRulesGetCartValues',array(&$cartvals, $cart, $products, $method, $cart_prices));
return $cartvals; return $cartvals;
} }
...@@ -1203,7 +1203,6 @@ class ShippingRule { ...@@ -1203,7 +1203,6 @@ class ShippingRule {
"evaluate_for_manufacturers" => 'manufacturers' "evaluate_for_manufacturers" => 'manufacturers'
); );
// JFactory::getApplication()->enqueueMessage("<pre>Scoping: condition is ".$filterkeys[$scoping].'='.print_r($conditionvals,1).", Old cartvals are: ".print_r($vals,1)."</pre>", 'error');
$conditions = array(); $conditions = array();
if (isset($filterkeys[$scoping])) if (isset($filterkeys[$scoping]))
$conditions[$filterkeys[$scoping]] = $conditionvals; $conditions[$filterkeys[$scoping]] = $conditionvals;
...@@ -1212,7 +1211,6 @@ class ShippingRule { ...@@ -1212,7 +1211,6 @@ class ShippingRule {
$filteredproducts = filterProducts($products, $conditions); $filteredproducts = filterProducts($products, $conditions);
// We have been handed a callback function to calculate the cartvals for the filtered list of products, so use it: // We have been handed a callback function to calculate the cartvals for the filtered list of products, so use it:
$filteredvals = $cartvals_callback($filteredproducts); $filteredvals = $cartvals_callback($filteredproducts);
// JFactory::getApplication()->enqueueMessage("<pre>Scoping: condition is ".print_r($conditions,1).", products filtered: ".count($filteredproducts).", New cartvals are: ".print_r($filteredvals,1)."</pre>", 'error');
return $this->evaluateTerm ($expr, $filteredvals, $filteredproducts, $cartvals_callback); return $this->evaluateTerm ($expr, $filteredvals, $filteredproducts, $cartvals_callback);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment