Guest User

Untitled

a guest
Oct 16th, 2018
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.48 KB | None | 0 0
  1. <button type="button" title="<?php echo $this->__('Check out') ?>" class="button btn-cart" onclick="setcheckoutLocation('<?php echo $this->getAddToCartUrl($_product) ?>','<?php echo Mage::getUrl('onestepcheckout/index/') ?>')"><span><span><?php echo $this->__('Buy Now') ?></span></span></button>
  2. <script>
  3. function setcheckoutLocation(location,chkout)
  4. {
  5. jQuery.ajax({
  6. type:"GET",
  7. url:location,
  8. success:function(data){
  9. window.location.href = chkout;
  10. }
  11. });
  12. }
  13. </script>
  14.  
  15. ?>
  16. <?php $_product = $this->getProduct(); ?>
  17. <?php $buttonTitle = $this->__('Add to Cart'); ?>
  18. <?php if ($_product->isSaleable()): ?>
  19. <div class="add-to-cart left-side">
  20. <?php if(!$_product->isGrouped()): ?>
  21. <div class="qty-wrapper">
  22. <label for="qty"><?php echo $this->__('Qty:') ?></label>
  23. <input type="text" name="qty" id="qty" maxlength="12" value="<?php echo $this->getProductDefaultQty() * 1 ?>" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Qty')) ?>" class="input-text qty" />
  24. </div>
  25. <?php endif; ?>
  26. <button type="button" title="<?php echo $buttonTitle ?>" id="product-addtocart-button" class="button btn-cart" onclick="productAddToCartForm.submit(this)"><span><span><?php echo $buttonTitle ?></span></span></button>
  27. </div>
  28. <div class="paypal-wrapper"><?php echo $this->getChildHtml('', true, true) ?></div>
  29. <?php endif; ?>
Add Comment
Please, Sign In to add comment