Version Notes
Tax rate calculation to product prices is fixed.
Download this release
Release Info
| Developer | Oyvind Henriksen |
| Extension | Poq_Integration |
| Version | 2.0.0.3.2 |
| Comparing to | |
| See all releases | |
Code changes from version 2.0.0.3.1 to 2.0.0.3.2
app/code/community/Poq/Integration/Helper/Data.php
CHANGED
|
@@ -93,11 +93,29 @@ class Poq_Integration_Helper_Data extends Mage_Core_Helper_Data {
|
|
| 93 |
|
| 94 |
|
| 95 |
/**
|
| 96 |
-
*
|
| 97 |
* @var string
|
| 98 |
*/
|
| 99 |
public $barcode_field;
|
| 100 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 101 |
|
| 102 |
/**
|
| 103 |
* Get settings
|
| 93 |
|
| 94 |
|
| 95 |
/**
|
| 96 |
+
* Barcode Field
|
| 97 |
* @var string
|
| 98 |
*/
|
| 99 |
public $barcode_field;
|
| 100 |
|
| 101 |
+
/**
|
| 102 |
+
* Price Field
|
| 103 |
+
* @var string
|
| 104 |
+
*/
|
| 105 |
+
public $productPrice_field;
|
| 106 |
+
|
| 107 |
+
/**
|
| 108 |
+
* Special Price Field
|
| 109 |
+
* @var string
|
| 110 |
+
*/
|
| 111 |
+
public $specialPrice_field;
|
| 112 |
+
|
| 113 |
+
/**
|
| 114 |
+
* Sub Categories For Child
|
| 115 |
+
* @var boolean
|
| 116 |
+
*/
|
| 117 |
+
public $setCategories_field;
|
| 118 |
+
|
| 119 |
|
| 120 |
/**
|
| 121 |
* Get settings
|
app/code/community/Poq/Integration/controllers/IndexController.php
CHANGED
|
@@ -193,7 +193,7 @@ class Poq_Integration_IndexController extends Mage_Core_Controller_Front_Action
|
|
| 193 |
$store_id = $settings->store_id;
|
| 194 |
$image_base_url = $settings->image_base_url;
|
| 195 |
$image_ignore_strings = $settings->image_ignore_string;
|
| 196 |
-
$tax_rates_enabled = $settings->
|
| 197 |
$description_fields = $settings->description_fields;
|
| 198 |
$description_values = $settings->description_values;
|
| 199 |
$barcode_field = $settings->barcode_field;
|
|
@@ -390,10 +390,9 @@ class Poq_Integration_IndexController extends Mage_Core_Controller_Front_Action
|
|
| 390 |
|
| 391 |
// Get tax rates if enabled
|
| 392 |
$tax_classes;
|
| 393 |
-
|
| 394 |
if ($tax_rates_enabled)
|
| 395 |
{
|
| 396 |
-
|
| 397 |
// Get all tax classes with their values
|
| 398 |
$tax_classes = Mage::helper('tax')->getAllRatesByProductClass();
|
| 399 |
}
|
| 193 |
$store_id = $settings->store_id;
|
| 194 |
$image_base_url = $settings->image_base_url;
|
| 195 |
$image_ignore_strings = $settings->image_ignore_string;
|
| 196 |
+
$tax_rates_enabled = $settings->tax_rates_enabled;
|
| 197 |
$description_fields = $settings->description_fields;
|
| 198 |
$description_values = $settings->description_values;
|
| 199 |
$barcode_field = $settings->barcode_field;
|
| 390 |
|
| 391 |
// Get tax rates if enabled
|
| 392 |
$tax_classes;
|
| 393 |
+
|
| 394 |
if ($tax_rates_enabled)
|
| 395 |
{
|
|
|
|
| 396 |
// Get all tax classes with their values
|
| 397 |
$tax_classes = Mage::helper('tax')->getAllRatesByProductClass();
|
| 398 |
}
|
app/code/community/Poq/Integration/controllers/OrderController.php
CHANGED
|
@@ -195,34 +195,9 @@ class Poq_Integration_OrderController extends Mage_Core_Controller_Front_Action
|
|
| 195 |
// Get product details by id
|
| 196 |
$product = Mage::getModel('catalog/product')->load($item['id']);
|
| 197 |
|
| 198 |
-
$parentIds = Mage::getResourceSingleton('catalog/product_type_configurable')
|
| 199 |
-
->getParentIdsByChild($item['id']);
|
| 200 |
-
$parentProduct = Mage::getModel('catalog/product')->load($parentIds[0]);
|
| 201 |
-
|
| 202 |
if (!is_null($product->getId()))
|
| 203 |
{
|
| 204 |
|
| 205 |
-
if (!is_null($parentProduct->getId())) {
|
| 206 |
-
|
| 207 |
-
$rowTotal = $parentProduct->getFinalPrice() * $item['quantity'];
|
| 208 |
-
|
| 209 |
-
// Set order item
|
| 210 |
-
$orderItem = Mage::getModel('sales/order_item')->setStoreId($storeId)
|
| 211 |
-
->setQuoteItemId(0)
|
| 212 |
-
->setQuoteParentItemId(NULL)
|
| 213 |
-
->setProductId($item['id'])
|
| 214 |
-
->setProductType($product->getTypeId())
|
| 215 |
-
->setQtyBackordered(NULL)
|
| 216 |
-
->setQtyOrdered($item['quantity'])
|
| 217 |
-
->setName($product->getName())
|
| 218 |
-
->setSku($product->getSku())
|
| 219 |
-
->setPrice($parentProduct->getPrice())
|
| 220 |
-
->setBasePrice($parentProduct->getPrice())
|
| 221 |
-
->setOriginalPrice($parentProduct->getPrice())
|
| 222 |
-
->setRowTotal($rowTotal)
|
| 223 |
-
->setBaseRowTotal($rowTotal);
|
| 224 |
-
}
|
| 225 |
-
else {
|
| 226 |
// Get total price per product by quantity
|
| 227 |
$rowTotal = $product->getPrice() * $item['quantity'];
|
| 228 |
|
|
@@ -241,7 +216,6 @@ class Poq_Integration_OrderController extends Mage_Core_Controller_Front_Action
|
|
| 241 |
->setOriginalPrice($product->getPrice())
|
| 242 |
->setRowTotal($rowTotal)
|
| 243 |
->setBaseRowTotal($rowTotal);
|
| 244 |
-
}
|
| 245 |
|
| 246 |
// Add order item total to subtotal
|
| 247 |
$subTotal += $rowTotal;
|
|
@@ -477,9 +451,11 @@ class Poq_Integration_OrderController extends Mage_Core_Controller_Front_Action
|
|
| 477 |
|
| 478 |
// Get products
|
| 479 |
$items = $post_data['items'];
|
| 480 |
-
|
|
|
|
| 481 |
$outOfStockItems = array();
|
| 482 |
|
|
|
|
| 483 |
// Set order products
|
| 484 |
foreach ($items as $item)
|
| 485 |
{
|
|
@@ -496,7 +472,7 @@ class Poq_Integration_OrderController extends Mage_Core_Controller_Front_Action
|
|
| 496 |
// Die if the product is not found
|
| 497 |
if (!$product)
|
| 498 |
{
|
| 499 |
-
die("Products in your shopping cart are out of stock:\n".$item['productTitle']
|
| 500 |
}
|
| 501 |
|
| 502 |
// The product has sold out
|
|
@@ -507,7 +483,7 @@ class Poq_Integration_OrderController extends Mage_Core_Controller_Front_Action
|
|
| 507 |
}
|
| 508 |
else
|
| 509 |
{
|
| 510 |
-
die("Products in your shopping cart are out of stock:\n".$item['productTitle']
|
| 511 |
}
|
| 512 |
}
|
| 513 |
else
|
| 195 |
// Get product details by id
|
| 196 |
$product = Mage::getModel('catalog/product')->load($item['id']);
|
| 197 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 198 |
if (!is_null($product->getId()))
|
| 199 |
{
|
| 200 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 201 |
// Get total price per product by quantity
|
| 202 |
$rowTotal = $product->getPrice() * $item['quantity'];
|
| 203 |
|
| 216 |
->setOriginalPrice($product->getPrice())
|
| 217 |
->setRowTotal($rowTotal)
|
| 218 |
->setBaseRowTotal($rowTotal);
|
|
|
|
| 219 |
|
| 220 |
// Add order item total to subtotal
|
| 221 |
$subTotal += $rowTotal;
|
| 451 |
|
| 452 |
// Get products
|
| 453 |
$items = $post_data['items'];
|
| 454 |
+
|
| 455 |
+
// Out of stock product names for error message
|
| 456 |
$outOfStockItems = array();
|
| 457 |
|
| 458 |
+
|
| 459 |
// Set order products
|
| 460 |
foreach ($items as $item)
|
| 461 |
{
|
| 472 |
// Die if the product is not found
|
| 473 |
if (!$product)
|
| 474 |
{
|
| 475 |
+
die("Products in your shopping cart are out of stock:\n".$item['productTitle']);
|
| 476 |
}
|
| 477 |
|
| 478 |
// The product has sold out
|
| 483 |
}
|
| 484 |
else
|
| 485 |
{
|
| 486 |
+
die("Products in your shopping cart are out of stock:\n".$item['productTitle']);
|
| 487 |
}
|
| 488 |
}
|
| 489 |
else
|
app/code/community/Poq/Integration/etc/config.xml
CHANGED
|
@@ -9,7 +9,7 @@
|
|
| 9 |
<config>
|
| 10 |
<modules>
|
| 11 |
<Poq_Integration>
|
| 12 |
-
<version>2.0.0.3.
|
| 13 |
</Poq_Integration>
|
| 14 |
</modules>
|
| 15 |
<global>
|
| 9 |
<config>
|
| 10 |
<modules>
|
| 11 |
<Poq_Integration>
|
| 12 |
+
<version>2.0.0.3.2</version>
|
| 13 |
</Poq_Integration>
|
| 14 |
</modules>
|
| 15 |
<global>
|
package.xml
CHANGED
|
@@ -1,18 +1,18 @@
|
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>Poq_Integration</name>
|
| 4 |
-
<version>2.0.0.3.
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license>ASL</license>
|
| 7 |
<channel>community</channel>
|
| 8 |
<extends/>
|
| 9 |
<summary>This integration forms a connection between the Magento and Poq Studio platforms.</summary>
|
| 10 |
<description>The extension has two main features: Exposing your catalogue information in the Poq Feed Format and Accepting a shopping cart transfer from the Poq Studio platform.</description>
|
| 11 |
-
<notes>
|
| 12 |
<authors><author><name>Oyvind Henriksen</name><user>poqmagento</user><email>info@poqstudio.com</email></author></authors>
|
| 13 |
-
<date>2015-01-
|
| 14 |
-
<time>11:
|
| 15 |
-
<contents><target name="magecommunity"><dir name="Poq"><dir name="Integration"><dir name="Helper"><file name="Data.php" hash="
|
| 16 |
<compatible/>
|
| 17 |
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
|
| 18 |
</package>
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>Poq_Integration</name>
|
| 4 |
+
<version>2.0.0.3.2</version>
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license>ASL</license>
|
| 7 |
<channel>community</channel>
|
| 8 |
<extends/>
|
| 9 |
<summary>This integration forms a connection between the Magento and Poq Studio platforms.</summary>
|
| 10 |
<description>The extension has two main features: Exposing your catalogue information in the Poq Feed Format and Accepting a shopping cart transfer from the Poq Studio platform.</description>
|
| 11 |
+
<notes>Tax rate calculation to product prices is fixed.</notes>
|
| 12 |
<authors><author><name>Oyvind Henriksen</name><user>poqmagento</user><email>info@poqstudio.com</email></author></authors>
|
| 13 |
+
<date>2015-01-20</date>
|
| 14 |
+
<time>11:24:16</time>
|
| 15 |
+
<contents><target name="magecommunity"><dir name="Poq"><dir name="Integration"><dir name="Helper"><file name="Data.php" hash="331a6fae0b9d92cf88716b934ef3e5c8"/><file name=".DS_Store" hash="437544c43163b0c119f0d54b3165090c"/></dir><dir name="controllers"><file name="IndexController.php" hash="1ddfaa629f7743e1ead494181b812a3d"/><file name="OrderController.php" hash="e9bd81665b14888f94d8035dee1c2a7a"/><file name=".DS_Store" hash="025876129ca0f7bccb475ea2c8665538"/></dir><dir name="etc"><file name="adminhtml.xml" hash="545b50fa7d354adb75a6bc27ff2ef41e"/><file name="config.xml" hash="f01d6e649f1b435aa8c12b7e0278de1d"/><file name="system.xml" hash="c11516cad4666cf9be1523781e66aeb0"/><file name=".DS_Store" hash="65a604f898cd198153f236c0aeb07b42"/></dir><file name=".DS_Store" hash="edbbdc9cbdcde369d585980e7a279eac"/></dir><file name=".DS_Store" hash="16eb133391c4355b50681fccd76eee48"/></dir></target><target name="mageetc"><dir name="modules"><file name="Poq_Integration.xml" hash="f735b9c01c16c559a05ba50185ef8a61"/></dir></target></contents>
|
| 16 |
<compatible/>
|
| 17 |
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
|
| 18 |
</package>
|
