0

I have a extension that shows a price slider for store credit in the Cart.

I do not use the Cart and customers go straight to the Checkout.

I want to show the slider on my checkout instead. Here is the code:

<checkout_cart_index>
    <reference name="head">
        <action method="addItem"><type>skin_css</type><name>css/ei/creditpoint/creditpoint.slider.css</name><params/></action>
        <action method="addItem"><type>skin_js</type><name>js/ei/creditpoint/creditpoint.slider.js</name><params/></action>
    </reference>
    <reference name="checkout.cart">
        <block type="core/text_list" name="coupon.and.discount" as="coupon">
            <action method="insert">
                <block>checkout.cart.coupon</block>
            </action>
            <block type="creditpoint/creditpoint" name="creditpoints.cart.block" as ="creditpointblock" template="ei/creditpoint/checkout/cart/creditpoint_cart.phtml" before="checkout.cart.coupon"/>
        </block>
    </reference>
</checkout_cart_index>

My One Step Checkout XML file is using:

<onestepcheckout_index_index_flat_25columns>
    <reference name="head">
        <action method="addCss">
            <stylesheet>css/magestore/onestepcheckout/flat/onestepcheckout.css</stylesheet>
        </action>
        <block type="page/html_head" name="mobie_view" template="onestepcheckout/flat/head.phtml"/>
    </reference>
    <reference name="content">
        <block type="onestepcheckout/onestepcheckout" name="onestepcheckout" template="onestepcheckout/flat/3columns.phtml">
            <block type="onestepcheckout/onestepcheckout" name="onestepcheckout_billing" as="onestepcheckout.billing" template="onestepcheckout/flat/onestepcheckout/billing.phtml" />
            <block type="onestepcheckout/onestepcheckout" name="onestepcheckout_shipping" as="onestepcheckout.shipping" template="onestepcheckout/flat/onestepcheckout/shipping.phtml" />
            <block type="checkout/onepage_shipping_method_available" name="onestepcheckout_shipping_method" as="onestepcheckout.shipping_method" template="onestepcheckout/flat/onestepcheckout/shipping_method.phtml"/>
            <block type="checkout/onepage_payment_methods" name="onestepcheckout_payment_method" as="onestepcheckout.payment_method" template="onestepcheckout/flat/onestepcheckout/payment_method.phtml">
                <action method="setMethodFormTemplate">
                    <method>purchaseorder</method>
                    <template>payment/form/purchaseorder.phtml</template>
                </action>
            </block>
            <block type="checkout/onepage_review" name="onestepcheckout.onestepcheckout.review" as="onestepcheckout.review" template="onestepcheckout/flat/onestepcheckout/review.phtml">
                <block type="checkout/agreements" name="onestepcheckout.onestepcheckout.agreements" as="agreements" template="checkout/onepage/agreements.phtml"/>
                <block type="checkout/onepage_review_info" name="review_info" as="info" template="onestepcheckout/flat/onestepcheckout/review/info.phtml">
                    <action method="addItemRender">
                        <type>default</type>
                        <block>checkout/cart_item_renderer</block>
                        <template>onestepcheckout/flat/onestepcheckout/review/item.phtml</template>
                    </action>
                    <action method="addItemRender">
                        <type>grouped</type>
                        <block>checkout/cart_item_renderer_grouped</block>
                        <template>onestepcheckout/flat/onestepcheckout/review/item.phtml</template>
                    </action>
                    <action method="addItemRender">
                        <type>configurable</type>
                        <block>checkout/cart_item_renderer_configurable</block>
                        <template>onestepcheckout/flat/onestepcheckout/review/item.phtml</template>
                    </action>
                    <action method="addItemRender">
                        <type>bundle</type>
                        <block>bundle/checkout_cart_item_renderer</block>
                        <template>onestepcheckout/flat/onestepcheckout/review/item.phtml</template>
                    </action>
                    <block type="checkout/cart_totals" name="checkout.onepage.review.info.totals" as="totals" template="onestepcheckout/flat/onestepcheckout/review/totals.phtml"/>
                </block>
            </block>
        </block>
    </reference>
    <reference name="before_body_end">
        <block type="core/template" template="onestepcheckout/flat/login_popup.phtml" name="login-popup" />
    </reference>
</onestepcheckout_index_index_flat_25columns>
0

Try this:

<checkout_onepage_index>
    <reference name="head">
        <action method="addItem"><type>skin_css</type><name>css/ei/creditpoint/creditpoint.slider.css</name><params/></action>
        <action method="addItem"><type>skin_js</type><name>js/ei/creditpoint/creditpoint.slider.js</name><params/></action>
    </reference>
    <reference name="checkout.onepage">
        <block type="core/text_list" name="coupon.and.discount" as="coupon">
            <action method="insert">
                <block>checkout.cart.coupon</block>
            </action>
            <block type="creditpoint/creditpoint" name="creditpoints.cart.block" as ="creditpointblock" template="ei/creditpoint/checkout/cart/creditpoint_cart.phtml" before="checkout.cart.coupon"/>
        </block>
    </reference>
</checkout_onepage_index>

This should add your block in checkout page. However, you will have to find the standard place for your block.

You may want to check <checkout_onepage_index translate="label"> node in "layout/checkout.xml" file.

  • This doesn't work. Im not sure what to do. The one step checkout I use is a paid extension. Is there more information I can provide? – Mike Tim Turner Jun 29 '16 at 12:21
  • you need to find layout file for that extension and paste in your org qst. – Adarsh Khatri Jun 29 '16 at 12:45
  • Updated my question. – Mike Tim Turner Jun 29 '16 at 13:08
  • You can replace <checkout_onepage_index> and </checkout_onepage_index> with <onestepcheckout_index_index_flat_25columns> and </onestepcheckout_index_index_flat_25columns>. Also <reference name="checkout.onepage"> with <reference name="onestepcheckout"> and that should work. Remember, your module will depend upon this third party module that you have. – Adarsh Khatri Jun 29 '16 at 23:10
0

Try this, here are the steps:

Step 1: make config.xml in your module (app/code/local/Vendor/ModuleName/etc/config.xml) with the following content:

<frontend>
    <layout>
        <updates>
            <addextrablock>
                <file>addextrablock.xml</file>
            </addextrablock>
        </updates>
    </layout>
</frontend>

Step 2: Then create your layout file app/design/frontend/base/default/layout/addextrablock.xml with the following content:

<checkout_onepage_index>
    <reference name="checkout.onepage">
        <block type="vendorname_modulename/addextrablock" name="add.extra.block" as="add.extra.block" template="addextrablock/addextrablock.phtml" />
    </reference>
</checkout_onepage_index>

Step 3: Then create your template file app/design/frontend/base/default/template/addextrablock/addextrablock.phtml with the following content:

"Add Extra Block"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.