Top

Use File Upload with an Ajax Theme

Warning!

This article only applies to Product Options Version 2.0. It requires technical knowledge and prior experience with JavaScript and Ajax. If you are not comfortable with this, Email our Support Wizards for help.

Ajax themes do not work well with file upload. Product Options 2.0 and higher has a customization that allows you to have both file uploads and an Ajax cart. Follow these steps to add this functionality:

  1. Select Online Store.

    select online store 

  2. Select Actions.

    Select Actions 

  3. Select Edit code.

    Select Edit code 

  4. Under "Assets", select theme.js.

    Note: If this file doesn’t exist, your main JavaScript file may be named: app.js, ajaxify.js, the same name as your theme or something similar.

    select theme.js 

  5. Search for addItemFromForm, it will look something like this:

    ShopifyAPI.addItemFromForm(evt.target, itemAddedCallback, itemErrorCallback);

    find this code 

  6. Change the part before .addItemFromForm to BOLD.helpers, it will look something like this:

    BOLD.helpers.addItemFromForm(evt.target, itemAddedCallback, itemErrorCallback);

    change the code 

  7. Select Save.

    select save 

That's it!