Magento: Difference between revisions

From Growth Agency Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
= Magento 1.x =
= Magento =


= Tag Installation =
Magento 1.x & Magento 2.x are different & require different installation methods


<pre>
[[Magento 1.x]]<br />
app\design\frontend\{theme}\default\layout\page
[[magento 2.x]]<br />
</pre>
 
in local.xml add in (<default></default>)
 
<pre>
<reference name="after_body_start">
 
<block type="core/template" name="after_body_start_script" template="page/html/after_body_start.phtml" />
</reference>
</pre>
== Conversion URL ==
 
checkout Success URL:
<pre>
/checkout/onepage/success/
</pre>
 
= Google Trusted Store =
 
<pre>
<?php
    $orderId = $this->getOrderId();
    $order = Mage::getModel('sales/order')->loadByIncrementId($orderId);
    $customer = Mage::getModel('customer/customer')->load($order->getCustomerId());
    $address = $order->getShippingAddress();
    $backorder = false; // some backorder logic
    $download = false; // some download logic
    $shipDate = new Zend_Date(); // some logic to determine ship date
?>
<!-- START Trusted Stores Order -->
<div id="gts-order" style="display:none;">
 
<!-- start order and merchant information -->
<span id="gts-o-id"><?php echo $orderId; ?></span>
<span id="gts-o-domain">www.rubberroofingdirect.co.uk</span>
<span id="gts-o-email"><?php echo htmlentities($customer->getEmail()); ?></span>
<span id="gts-o-country">GB</span>
<span id="gts-o-currency">GBP</span>
<span id="gts-o-total"><?php echo number_format((float)$order->getGrandTotal(), 2, '.', ''); ?></span>
<span id="gts-o-discounts">-<?php echo number_format((float)$order->getDiscountAmount(), 2, '.', ''); ?></span>
<span id="gts-o-shipping-total"><?php echo number_format((float)$order->getShippingAmount(), 2, '.', ''); ?></span>
<span id="gts-o-tax-total"><?php echo number_format((float)$order->getTaxAmount(), 2, '.', ''); ?></span>
<span id="gts-o-est-ship-date"><?php echo $shipDate->toString('yyyy-MM-dd'); ?></span>
<span id="gts-o-has-preorder">N</span>
<span id="gts-o-has-digital">N</span>
<!-- end order and merchant information -->
 
<!-- start repeated item specific information -->
<?php foreach ($order->getAllItems() as $item): ?>
<span class="gts-item">
<span class="gts-i-name"><?php echo htmlentities($item->getName()); ?></span>
    <span class="gts-i-price"><?php echo number_format((float)$item->getBasePrice(), 2, '.', ''); ?></span>
    <span class="gts-i-quantity"><?php echo (int)$item->getQtyOrdered(); ?></span>
    <span class="gts-i-prodsearch-id"><?php echo $item->getId(); ?></span>
    <span class="gts-i-prodsearch-store-id">637049</span>
    <span class="gts-i-prodsearch-country">GB</span>
    <span class="gts-i-prodsearch-language">en</span>
</span>
<?php endforeach; ?>
<!-- end repeated item specific information -->
 
</div>
<!-- END Trusted Stores -->
</pre>
 
= Magento 2.x =

Latest revision as of 11:21, 29 September 2021

Magento

Magento 1.x & Magento 2.x are different & require different installation methods

Magento 1.x
magento 2.x