2015-10-16 87 views
0

我正在使用Magento ver。 1.9.0.1 我用lotusbreath一頁結帳擴展版本。 3.2.1但是當我選擇訪客用戶時,當我點擊了Place Order按鈕後,完成了所有步驟後,ajax正在打電話,但它不會進入成功頁面並顯示錯誤ReferenceError: Review is not defined,但它對註冊用戶來說工作正常。下訂單按鈕不工作在一頁結帳頁magento

請參閱下面的代碼:

/app/design/frontend/base/default/template/lotusbreath/onestepcheckout/onepage/review/info.phtml

<?php echo $this->getChildHtml('items_before'); ?> 

<div id="checkout-review-table-wrapper"> 
    <table class="table data-table" id="checkout-review-table"> 
     <?php if ($this->helper('tax')->displayCartBothPrices()): $colspan = $rowspan = 2; else: $colspan = $rowspan = 1; endif; ?> 

     <?php if ($this->helper('tax')->displayCartBothPrices()): ?> 

     <?php endif; ?> 

     <thead> 
     <tr> 
      <th rowspan="<?php echo $rowspan ?>"><?php echo $this->__('PHOTO') ?></th> 
      <?php /*?> <th colspan="<?php echo $colspan ?>" class="a-center"><?php echo $this->__('Price') ?></th><?php */?> 
      <th colspan="<?php echo $colspan ?>" class="a-center"><?php echo $this->__('Size') ?></th> 
      <th rowspan="<?php echo $rowspan ?>" wrap="wrap" class="a-center"><?php echo $this->__('Qty') ?></th> 
      <th colspan="<?php echo $colspan ?>" class="a-center"><?php echo $this->__('Price') ?></th> 
      <!--<th colspan="<?php echo $colspan ?>" class="a-center remove-item-diplay" style="display: none;"></th> --> 
     </tr> 
     <?php if ($this->helper('tax')->displayCartBothPrices()): ?> 
      <tr> 
       <th class="a-right"><?php echo $this->helper('tax')->getIncExcTaxLabel(false) ?></th> 
       <th><?php echo $this->helper('tax')->getIncExcTaxLabel(true) ?></th> 
       <th class="a-right"><?php echo $this->helper('tax')->getIncExcTaxLabel(false) ?></th> 
       <th><?php echo $this->helper('tax')->getIncExcTaxLabel(true) ?></th> 
       <!--<th></th> --> 
      </tr> 
     <?php endif; ?> 
     </thead> 
     <?php echo $this->getChildHtml('totals'); ?> 
     <tbody> 
     <?php foreach ($this->getItems() as $_item): ?> 
      <?php echo $this->getItemHtml($_item) ?> 
     <?php endforeach ?> 

     </tbody> 

    </table> 
</div> 
<?php echo $this->getChildHtml('items_after'); ?> 
<script type="text/javascript">//jQuery('#checkout-review-table').decorate('table');</script> 
<div id="checkout-review-submit"> 

</div> 
<div id="checkout-paypaliframe-load" class="authentication white-popup mfp-hide"></div> 
<div class="clearfix"></div> 
<script type="text/javascript"> 
    //<![CDATA[ 
    review = new Review(); 
    //]]> 
</script> 

/應用/設計/前端/基/默認/模板/ lotusbreath/onestepcheckout/onepage /審查/ totals.phtml

<?php 
$isNewsletter = Mage::getStoreConfig('lotusbreath_onestepcheckout/general/allowsubscribe'); 
if ($isNewsletter){ 
    if(Mage::getSingleton('customer/session')->isLoggedIn()){ 
     $subscriber = Mage::getModel('newsletter/subscriber')->loadByEmail(
      Mage::getSingleton('customer/session')->getCustomer()->getEmail()); 
     if($subscriber && $subscriber->getId()) 
     { 
      $isNewsletter = false; 
     } 

    } 
} 
?> 
<?php if ($this->getTotals()): ?> 
<tfoot> 

    <?php $_colspan = $this->helper('tax')->displayCartBothPrices() ? 5 : 3; ?> 
    <?php echo $this->renderTotals(null, $_colspan); ?> 
    <!--<tr> 
     <td class="a-right" colspan="4" style="height: 10px;"></td> 
    </tr> 
    !--> 
    <?php echo $this->renderTotals('footer', $_colspan); ?> 

    <?php if ($this->needDisplayBaseGrandtotal()):?> 
    <tr> 

     <td class="a-right" colspan="<?php echo $_colspan; ?>"> 
      <small><?php echo $this->helper('sales')->__('Your credit card will be charged for') ?></small> 
     </td> 
     <td class="a-right"> 
      <small><?php echo $this->displayBaseGrandtotal() ?></small> 
     </td> 
    </tr> 
    <?php endif?> 

    <tr> 
     <td class="a-right" colspan="<?php echo $_colspan+ 1;?>"> 

      <div class="row edit-cart-review"> 

      <?php if (Mage::getStoreConfig('lotusbreath_onestepcheckout/revieworder/show_link_cart')):?> 
       <div class="forgot-link"> 
        <span> <?php echo $this->__('Forgot an Item?') ?> <a 
          href="<?php echo $this->getUrl('checkout/cart') ?>"><?php echo $this->__('Edit Your Cart') ?> 
         </a> 
        </span> 

       </div> 
      <?php endif;?> 

       <?php 
       $canEditCart = Mage::getStoreConfig('lotusbreath_onestepcheckout/revieworder/can_edit_cart'); 
       ?> 
       <?php if ($canEditCart):?> 
        <div class="lt-buttons-set right" id="review-buttons-container"> 
         <button type="button" name="edit_cart_action" id="edit_cart_action" 
           value="update_qty" title="<?php echo $this->__('Edit Your Cart') ?>" class="button btn-update"> 
          <span><span><?php echo $this->__('Edit Your Cart') ?></span></span></button> 
         <button type="button" name="edit_cart_action" id="update_cart_action" 
           value="update_qty" title="<?php echo $this->__('Update') ?>" class="button btn-update" style="display: none;"> 
          <span><span><?php echo $this->__('Update') ?></span></span></button> 
         <button type="button" name="edit_cart_action" id="cancel_cart_action" 
           value="update_qty" title="<?php echo $this->__('Cancel') ?>" class="button btn-close" style="display: none;"m> 
          <span><span><?php echo $this->__('Cancel') ?></span></span></button> 
        </div> 

       <?php endif;?> 
      </div> 
      <?php if ($isNewsletter):?> 
       <p class="newsletter"> 

        <input type="checkbox" id="newsletter-signup" name="newsletter" value="1" 
          title="<?php echo Mage::helper('newsletter')->__('Sign up for our newsletter') ?>" 
          class="checkbox" 
         <?php 
         echo Mage::getStoreConfig('lotusbreath_onestepcheckout/general/autochecksubscriber') ? 'checked="checked"' : ''; 
         ?> 
         /> 
        <label for="newsletter-signup"> 
         <?php echo Mage::helper('newsletter')->__('Sign up for our newsletter') ?> 
        </label> 
       </p> 
      <?php endif;?> 
      <?php echo $this->getChildHtml('agreements') ?> 
      <div id="saveOder-error" class="error"></div> 
      <button role='review-save' type="submit" 
        title="<?php echo Mage::helper('checkout')->__('Place Order') ?>" name="submitbtn" 
        id="lbonepage-place-order-btn" class="button btn-checkout"> 
       <span><span><?php echo Mage::helper('checkout')->__('Place Order') ?></span></span> 
      </button> 

     </td> 
    </tr> 
</tfoot> 
<?php endif; ?> 

如果anyboby知道這一點,請幫助我。 謝謝!

+0

如果這真的是審查的方式被初始化,它缺少的構造函數中的一些數據。看看默認模板(base/default/template/checkout/onepage/review/info.phml)。 此外,網頁中是否包含正確的JavaScript文件? – Mike

+0

不,我試過,但它沒有工作 – kingp

+0

任何人都可以請幫助我獲得解決方案 – kingp

回答

0

變化lotusbreath腳本/ onestepcheckout/onepage /審查/ info.phtml到:

<script type="text/javascript"> 
    //<![CDATA[ 
     review = new Review('<?php echo $this->getUrl('checkout/onepage/saveOrder', array('form_key' => Mage::getSingleton('core/session')->getFormKey())) ?>', '<?php echo $this->getUrl('checkout/onepage/success') ?>', $('checkout-agreements')); 
    //]]> 
    </script> 
+0

我已經嘗試過,但問題不解決在JSON它顯示成功虛假錯誤真正爲什麼我不知道 – kingp

+0

檢查你的錯誤登錄var/report – faizanbeg

+0

var/report文件夾中沒有任何頁面,但在響應部分顯示在結果數組中:error_messages「:」請檢查送貨地址信息。請輸入電話號碼。「 – kingp

相關問題