diff --git a/MageWire/Component.php b/MageWire/Component.php deleted file mode 100644 index 02832084..00000000 --- a/MageWire/Component.php +++ /dev/null @@ -1,25 +0,0 @@ -startSetup(); - - $tableName = $installer->getTable('sales_order'); - - if ($installer->getConnection()->isTableExists($tableName) == true) { - $installer->getConnection()->addColumn( - $setup->getTable('sales_order'), - 'trytagging_marketing', - [ - 'type' => Table::TYPE_TEXT, - 'nullable' => true, - 'comment' => 'TryTagging Marketing Data' - ] - ); - } - - $installer->endSetup(); - } -} diff --git a/Test/Integration/Util/ProductDataMapperTest.php b/Test/Integration/Util/ProductDataMapperTest.php deleted file mode 100644 index 2c6d57c2..00000000 --- a/Test/Integration/Util/ProductDataMapperTest.php +++ /dev/null @@ -1,54 +0,0 @@ -createProduct( - 1, - 'Product 1', - 'product1', - 1.42, - ); - - $productDataMapper = ObjectManager::getInstance()->get(ProductDataMapper::class); - $productData = $productDataMapper->mapByProduct($product); - - $this->assertNonEmptyValueInArray('item_id', $productData); - $this->assertSame(1, $productData['magento_id']); - $this->assertSame('product1', $productData['magento_sku']); - $this->assertSame('product1', $productData['item_id']); - $this->assertSame('product1', $productData['item_sku']); - $this->assertSame('Product 1', $productData['item_name']); - $this->assertSame(1.42, $productData['price']); - } - - /** - * @param int $id - * @param string $name - * @param string $sku - * @param float $price - * @return ProductInterface - */ - private function createProduct(int $id, string $name, string $sku, float $price): ProductInterface - { - $productFactory = ObjectManager::getInstance()->get(ProductInterfaceFactory::class); - $product = $productFactory->create(); - $product->setId($id); - $product->setName($name); - $product->setSku($sku); - $product->setPrice($price); - return $product; - } -} diff --git a/etc/db_schema.xml b/etc/db_schema.xml new file mode 100644 index 00000000..f2a34891 --- /dev/null +++ b/etc/db_schema.xml @@ -0,0 +1,7 @@ + + + + +
+
\ No newline at end of file diff --git a/etc/di.xml b/etc/di.xml index c989bdde..f528ef4e 100644 --- a/etc/di.xml +++ b/etc/di.xml @@ -57,4 +57,10 @@ + + + + Tagging\GTM\MageWire\Component\ComponentFactory + + diff --git a/etc/module.xml b/etc/module.xml index 8065da11..26dadc23 100644 --- a/etc/module.xml +++ b/etc/module.xml @@ -1,6 +1,6 @@ - + diff --git a/view/frontend/templates/hyva_checkout/data-layer.phtml b/view/frontend/templates/hyva_checkout/data-layer.phtml index d142454e..b3994745 100644 --- a/view/frontend/templates/hyva_checkout/data-layer.phtml +++ b/view/frontend/templates/hyva_checkout/data-layer.phtml @@ -3,11 +3,11 @@ declare(strict_types=1); use Magento\Framework\View\Element\Template; use Tagging\GTM\DataLayer\Event\BeginCheckout as BeginCheckoutEvent; -use Tagging\GTM\MageWire\Checkout as CheckoutComponent; +use Tagging\GTM\MageWire\Component\AbstractComponent; /** @var Template $block */ /** @var BeginCheckoutEvent $beginCheckoutEvent */ -/** @var CheckoutComponent $magewire */ +/** @var AbstractComponent $magewire */ $magewire = $block->getData('magewire'); if (false === $magewire->isHyvaCheckoutEnabled()) { return;