Edit Gift Messaging Button

This tweak allows customers to go back to the upsell page where they can edit any gift message product options that they've added to products.

Wireframe

Gift message button


Preparation Checklist

Before you start this tweak, it's a good idea to run through our preparation checklist below:

  • Read through the Getting Started to get a better sense of how the control panel, Database and Front End store interact.
  • Learn our recommended Simple Workflow. This makes the implementation process as easy as possible.
  • Create a new Staging Theme for this tweak. This allows you to preview any changes before they are visible to live customers.
  • The code snippet in this tweak doc uses Bootstrap 3, you may need to alter this code depending on what version of Bootstrap your theme is using. You can find out what version your theme is using here.

Coding Instructions

Step 1: Activate the option-editing functionality on the upsells page

In the control panel, go to the cog icon, then select "Advanced Configuration", and search for "checkout_upsell_extra" in the "name" field. When the result is found, click on it and change the value to "yes". This ensures that the product option functionality is shown on the upsell page.

Step 2: Add the "Edit Gift Messaging" button

Open the shopping cart file /httpdocs/assets/themes/[THEME-NAME]/templates/cart/shopping_cart.template.html file, and paste the following section of code directly beneath the closing config tag for [%config id:'ALLOW_USER_QUOTE' if:'==' value:'1'%]

<div class="col-xs-12 col-md-3">
    <button class="btn btn-default btn-block" type="button" onclick="window.location='[%url page:'checkout' fn:'upsell'/%]';" title="Edit Gift Messaging"><i class="fa fa-gift icon-white"></i> Edit Gift Messaging</button>
</div>

Once complete, replace the below block of code...

<div class="col-xs-12 col-md-3 [%config id:'ALLOW_USER_QUOTE' if:'==' value:'1'%]col-md-offset-6[%/config%][%config id:'ALLOW_USER_QUOTE' if:'==' value:'0'%]col-md-offset-9[%/config%]">
    <button class="btn btn-success btn-lg btn-block" type="button" onclick="window.location='[%url page:'checkout' fn:'payment'/%]';" title="Checkout Now"><i class="fa fa-shopping-cart icon-white"></i> Checkout Now</button>
</div>

...with this:

<div class="col-xs-12 col-md-3 [%config id:'ALLOW_USER_QUOTE' if:'==' value:'1'%]col-md-offset-3[%/config%][%config id:'ALLOW_USER_QUOTE' if:'==' value:'0'%]col-md-offset-6[%/config%]">
    <button class="btn btn-success btn-lg btn-block" type="button" onclick="window.location='[%url page:'checkout' fn:'payment'/%]';" title="Checkout Now"><i class="fa fa-shopping-cart icon-white"></i> Checkout Now</button>
</div>

Final Result

Gift message button

Was this article useful?

Be notified when this page is updated. Optional.