Magento - go to the Checkout menu item in the subject

I am looking to track the file (and its location) that the “Proceed to Scan” button generates in the Magento trash.

Try adding the item to the cart, and then go to the cart. The “Proceed to check” button is located on the right side of the cart.

I use a hacked variation of an empty topic, if that matters.

Thanks in advance for your help.

+6
source share
5 answers

The code that creates the Get Started link is in the /checkout/onepage/link.phtml templates

By default, the block for it is in checkout.xml;

<block type="core/text_list" name="checkout.cart.methods" as="methods" translate="label"> <label>Payment Methods After Checkout Button</label> <block type="checkout/onepage_link" name="checkout.cart.methods.onepage" template="checkout/onepage/link.phtml"/> <block type="checkout/multishipping_link" name="checkout.cart.methods.multishipping" template="checkout/multishipping/link.phtml"/> </block> 
+9
source
 app/design/frontend/your_package/your_theme/template/checkout/onepage/link.phtml 
+3
source

The Go to Checkout button, which leads to the verification of one page, is generated using this template: checkout/onepage/link.phtml .

You should know which buttons are added using templates by looking at the checkout_cart_index descriptor in the checkout_cart_index layout file. A block called checkout.cart.methods contains all the buttons, and two basic check buttons must be added to it directly in the same file.

+2
source

Go to "System" → "Configuration" → "Developer", change the current configuration area to some of your websites or stores, and then go to the "Debugging" section, and change the "Path Template Settings" to "Yes". Now on the interface you will see the full path to the template file in the file system for each displayed block, so now you can see where your template is (which displays the link).

+2
source

Open this path in the root directory

 /app/design/frontend/base/default/template/checkout/onepage/link.phtml 

find this code

 <?php if ($this->isPossibleOnepageCheckout()):?> <button type="button" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Proceed to Checkout')) ?>" class="button btn-proceed-checkout btn-checkout<?php if ($this->isDisabled()):?> no-checkout<?php endif; ?>"<?php if ($this->isDisabled()):?> disabled="disabled"<?php endif; ?> onclick="window.location='<?php echo $this->getCheckoutUrl() ?>';"><span><span><?php echo $this->__('Proceed to Checkout') ?></span></span></button> <?php endif?> 
+1
source

Source: https://habr.com/ru/post/921496/


All Articles