2012-09-18 65 views
0

我跟随在这里 Add Google trust badge to Magento添加谷歌信任商店徽章

的步骤,然后在这里: http://www.magentocommerce.com/magento-connect/google-trusted-stores.html

在所有页面第一个JavaScript部分显示的罚款。 在结帐成功页面中,它不显示罚款的代码。 (请参阅下面的更新) 我知道我正在编辑正确的文件,因为我在static.phtml中输入了静态文本 但是在排序后,我无法看到应该生成的生成html。

我将该代码放在文件的末尾。

<?php 
/** 
* Magento 
* 
* NOTICE OF LICENSE 
* 
* This source file is subject to the Academic Free License (AFL 3.0) 
* that is bundled with this package in the file LICENSE_AFL.txt. 
* It is also available through the world-wide-web at this URL: 
* http://opensource.org/licenses/afl-3.0.php 
* If you did not receive a copy of the license and are unable to 
* obtain it through the world-wide-web, please send an email 
* to [email protected] so we can send you a copy immediately. 
* 
* DISCLAIMER 
* 
* Do not edit or add to this file if you wish to upgrade Magento to newer 
* versions in the future. If you wish to customize Magento for your 
* needs please refer to http://www.magentocommerce.com for more information. 
* 
* @category design 
* @package  base_default 
* @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) 
* @license  http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) 
*/ 
?> 
123 
<div class="page-title"> 
    <h1><?php echo $this->__('Your order has been received') ?></h1> 
</div> 
<?php echo $this->getMessagesBlock()->getGroupedHtml() ?> 
<h2 class="sub-title"><?php echo $this->__('Thank you for your purchase!') ?></h2> 

<?php if ($this->getOrderId()):?> 
<?php if ($this->getCanViewOrder()) :?> 
    <p><?php echo $this->__('Your order # is: %s.', sprintf('<a href="%s">%s</a>', $this->escapeHtml($this->getViewOrderUrl()), $this->escapeHtml($this->getOrderId()))) ?></p> 
<?php else :?> 
    <p><?php echo $this->__('Your order # is: %s.', $this->escapeHtml($this->getOrderId())) ?></p> 
<?php endif;?> 
    <p><?php echo $this->__('You will receive an order confirmation email with details of your order and a link to track its progress.') ?></p> 
<?php if ($this->getCanViewOrder() && $this->getCanPrintOrder()) :?> 
    <p> 
     <?php echo $this->__('Click <a href="%s" onclick="this.target=\'_blank\'">here to print</a> a copy of your order confirmation.', $this->getPrintUrl()) ?> 
     <?php echo $this->getChildHtml() ?> 
    </p> 
<?php endif;?> 
<?php endif;?> 

<?php if ($this->getAgreementRefId()): ?> 
    <p><?php echo $this->__('Your billing agreement # is: %s.', sprintf('<a href="%s">%s</a>', $this->escapeHtml($this->getAgreementUrl()), $this->escapeHtml($this->getAgreementRefId())))?></p> 
<?php endif;?> 

<?php if ($profiles = $this->getRecurringProfiles()):?> 
<p><?php echo $this->__('Your recurring payment profiles:'); ?></p> 
<ul class="disc"> 
<?php foreach($profiles as $profile):?> 
<?php $profileIdHtml = ($this->getCanViewProfiles() ? sprintf('<a href="%s">%s</a>', $this->escapeHtml($this->getProfileUrl($profile)), $this->escapeHtml($this->getObjectData($profile, 'reference_id'))) : $this->escapeHtml($this->getObjectData($profile, 'reference_id')));?> 
    <li><?php echo $this->__('Payment profile # %s: "%s".', $profileIdHtml, $this->escapeHtml($this->getObjectData($profile, 'schedule_description')))?></li> 
<?php endforeach;?> 
</ul> 
<?php endif;?> 

<div class="buttons-set"> 
    <button type="button" class="button" title="<?php echo $this->__('Continue Shopping') ?>" onclick="window.location='<?php echo $this->getUrl() ?>'"><span><span><?php echo $this->__('Continue Shopping') ?></span></span></button> 
</div> 

<script type="text/javascript"> 
<!-- 
/* NexTag ROI Optimizer Data */ 
var id = '3551264'; 
var rev = '<<?php echo Mage::getSingleton('core/session')->getScriptRevenue(); ?>>'; 
var order = '<<?php echo $this->getOrderId(); ?>>'; 
var cats = '<?php echo Mage::getSingleton('core/session')->getScriptCats(); ?>'; 
var prods = '<?php echo Mage::getSingleton('core/session')->getScriptProds(); ?>'; 
var units = '<?php echo Mage::getSingleton('core/session')->getScriptUnits(); ?>'; 
//--> 
</script> 
<script type="text/javascript" src="https://imgsrv.nextag.com/imagefiles/includes/roitrack.js"></script> 

<?php 
$order = Mage::getModel('sales/order')->loadByIncrementId(Mage::getSingleton('checkout/session')->getLastRealOrderId()); 
$amount = number_format($order->getGrandTotal(),2); 
?> 

<?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.theprinterdepo.com}</span> 
<span id="gts-o-email"><?php echo htmlentities($customer->getEmail()); ?></span> 
<span id="gts-o-country"><?php echo htmlentities($address->getCountryId()); ?></span> 
<span id="gts-o-currency">USD</span> 
<span id="gts-o-total"><?php echo $order->getGrandTotal(); ?></span> 
<span id="gts-o-discounts">-<?php echo $order->getDiscountAmount(); ?></span> 
<span id="gts-o-shipping-total"><?php echo $order->getShippingAmount(); ?></span> 
<span id="gts-o-tax-total"><?php echo $order->getTaxAmount(); ?></span> 
<span id="gts-o-est-ship-date"><?php echo $shipDate->toString('yyyy-MM-dd'); ?></span> 
<span id="gts-o-has-preorder"><?php echo $backorder ? 'Y' : 'N'; ?></span> 
<span id="gts-o-has-digital"><?php echo $download ? 'Y' : '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 $item->getBasePrice(); ?></span> 
<span class="gts-i-quantity"><?php echo (int)$item->getQtyOrdered(); ?></span> 
<span class="gts-i-prodsearch-country">US</span> 
<span class="gts-i-prodsearch-language">en</span> 
</span> 
<?php endforeach; ?> 
<!-- end repeated item specific information --> 

</div> 
<!-- END Trusted Stores --> 

UPDATE: 我删除的代码,因为它们显示在第一个链接,我安装了Magento的扩展,应自动插入代码需要它是。在任何页面和订单成功页面上检查html后,我可以看到代码是真正生成的,我无法看到谷歌说的验证栏。

(我仍然无法看到徽章)

它的怪异,我不能看到兴田HTML代码时,我右击查看源代码,但是,如果检查有萤火精简版的代码是有

<div id="gts-order" style="display: none; "> 
<span id="gts-o-id">900001439</span> 
<span id="gts-o-domain">{www.theprinterdepo.com}</span> 
<span id="gts-o-email">[email protected]</span> 
<span id="gts-o-country">US</span> 
<span id="gts-o-currency">USD</span> 
<span id="gts-o-total">449.8400</span> 
<span id="gts-o-discounts">-0.0000</span> 
<span id="gts-o-shipping-total">34.8500</span> 
<span id="gts-o-tax-total">0.0000</span> 
<span id="gts-o-est-ship-date">2012-09-18</span> 
<span id="gts-o-has-preorder">N</span> 
<span id="gts-o-has-digital">N</span> 
<span class="gts-item"> 
<span class="gts-i-name">HP LaserJet Pro 100 M175nw MFP Printer</span> 
<span class="gts-i-price">414.9900</span> 
<span class="gts-i-quantity">1</span> 
<span class="gts-i-prodsearch-country">US</span> 
<span class="gts-i-prodsearch-language">en</span> 
</span> 
</div> 
+0

我也安装了magento扩展,然后我删除了上面的代码,代码在html中生成的很好,徽章仍然没有显示。 –

+0

随时可以用签证卡做一个测试订单4,15次1.如果你想要切换 –

+0

我会先从'style =“display:none;开始''div id =”gts-order“ style =“display:none;”>' –

回答

1

这只能在US ip adddresses中完成,否则验证工具栏和预览标记不会出现。我连接到我们的桌面,然后我可以做所有的验证。

+0

意外地发现了这个答案,并且它从碰撞墙上撞到头部时非常感谢。 – Giedrius