Rename the submit button in the shopping cart’s Shipping Estimator in SiteBuilder

Some SiteBuilder users are using the Shipping estimator on their web stores shopping cart to provide shoppers an option to estimate the shipping cost on the shopping cart level without going to the entire checkout process and reach the review and submit section. 

Pre-requisite: The shopping estimator should exist in the shopping cart. To verify,
navigate to Setup Site Builder > Set Up Web Site > Appearance tab > Shopping cart section > Show Shipping Estimator in Cart field is checked.

  1. Navigate to Commerce Site Builder Tags New
  2. Fields:
    a. Tag: set preferred name for the tag (example: CHANGESUBMIT)
    b. Click Save
  3. Locate the theme that the user is currently using on the webstore:
    a. Navigate to Commerce Websites Website List
    b. Navigate to the Appearance tab 
    c. Go to Web Site Templates section
    d. Take note of the theme that is associated in the Web Site Theme field
    In case user is using the standard Basic Theme, user needs to customize a theme and then associate it on this field.
  4. Navigate to Commerce Site Builder > Themes
  5. Edit the theme noted in Step 3.d.
  6. Go to the Body tab 
  7. Go to the Footer Template section
  8. Scroll on the button of the text area field 
  9. Add the Tag created in Step #2 

    Example: <CHANGESUBMIT>
  10. Navigate to Commerce > Site Builder > Tabs

    Make sure that in case user does have a multiple web stores, the filter on the list of tabs is the Web Site where the Theme is associated.
  11. Edit the shopping cart tab
  12. Navigate to the Tag Substitution tab:
    a. Locate the tag created in Step 2. (Example: CHANGESUBMIT )
    b. On the Substitution Value place the following code:
<script>
function addLoadEvent(func) {
var oldonload = window.onload;
if (typeof window.onload != 'function') {
window.onload = func;
} else {
window.onload = function() {
if (oldonload) {
oldonload();
}
func();
}
}
}
addLoadEvent(function() {
document.getElementById('submitter').value='New Submit Button Label';
});
</script>


 Change the value on the code and don’t forget that the value is enclosed in single quotation marks.

c. Click the Add button

d. Click Save

Leave a comment

Your email address will not be published. Required fields are marked *