How to Install & Update Square for OpenCart 1.5.x

Before you begin We recommend you do a full backup of your OpenCart files and database, just in case.

Installation Instructions

The release for OpenCart 1.5.x relies on vQmod. Make sure you have vQmod installed on your store. If not, download it from here https://github.com/vqmod/vqmod/releases and install it by following the instructions here.

  1. Unzip the downloaded Square .ZIP file into a new directory
  2. Navigate to the new directory. It contains a directory called Upload/
  3. (Optional) If necessary, rename the admin/ and admin/language/english directories to match your OpenCart setup
  4. Upload the contents of the Upload/ directory to your OpenCart installation, making sure to preserve the directory structure
  5. Go to Extensions > Payments > Square and click the Install button.

Congratulations! You just installed Square in OpenCart 1.5.x.

Configuration

To learn how to configure Square, please follow our video tutorial or head over to the Integration Settings page.

Update Instructions

Before you begin We recommend you do a full backup of your OpenCart files and database, just in case.

  1. Follow the installation instructions above.
  2. Go to Extensions > Payments > Square > Edit and configure your settings.
  3. Click Save on the top right.
  4. (Important) Please make sure that your CRON is set to run every minute instead of every hour. Also, please ensure the Square command is up-to-date in your CRON jobs. You can find more information on how to set the CRON on the CRON Job Settings page.

That's it! Square is now updated.

Developers

The vQmod file will modify the following OpenCart files:

  • admin/view/template/common/header.tpl: Used to properly display the Square admin panel.
  • system/startup.php: Registers an autoloader for the Square library files.
  • catalog/view/theme/*/template/account/account.tpl: Inserts the "Manage Stored Credit Cards" link in the user's main account page.
  • catalog/controller/account/account.php: Loads Square's language file for displaying the extension's account page additions.
  • catalog/view/theme/*/template/module/account.tpl: Inserts the "Manage Stored Credit Cards" in the user's account page sidebar.
  • catalog/controller/module/account.php: Loads Square's language file for displaying the extension's account page additions.
  • admin/controller/common/home.php: Injects a link into the dashboard to show a token expiration message.
  • admin/view/template/common/home.tpl: Injects an Ajax call into the dashboard to check whether Square's access token is about to expire.
  • admin/controller/sale/order.php: Injects a link to the order info in the order page.
  • admin/view/template/sale/order_info.tpl: Inserts a link to the Square transaction view.
  • admin/controller/catalog/product.php: Loads Square's code for displaying the warning text page additions.
  • admin/view/template/catalog/product_form.tpl: Inserts a warning text in to the product's view.
  • catalog/model/checkout/order.php: Loads Square's code for processing order data before and after adding order history.
  • admin/model/sale/order.php: Loads Square's code for processing order data before and after adding order history.

After installation/update the following new database tables will be introduced:

  • squareup_ad_hoc: This is used to store the ad-hoc order items in OpenCart. It is used to restrict re-stocks for ad-hoc items.
  • squareup_catalog: This holds the data for the Square catalog - Square ID, product and product options data, Square location, etc.
  • squareup_category_category: This holds the Square references between OpenCart categories and Square categories.
  • squareup_combination: This hold the combinations between the required product options - OpenCart product ID, option name, etc.
  • squareup_combination_item_variation: This hold the references between OpenCart combinations and Square item variations.
  • squareup_customer: This holds the relationships between your registered customers and your Square customers.
  • squareup_diff: This holds the information about the difference between Square's and OpenCart's data and the history about the changes made to them.
  • squareup_option_modifier_list: This is currently a deprecated table which might be used in a future version.
  • squareup_option_value_modifier: This is currently a deprecated table which might be used in a future version.
  • squareup_product_item: This holds the references between OpenCart products and Square items.
  • squareup_product_item_image: This holds references between product images and Square images.
  • squareup_product_option_modifier_list: This is currently a deprecated table which might be used in a future version.
  • squareup_product_option_value_modifier: This is currently a deprecated table which might be used in a future version.
  • squareup_refund: This one holds the data for the refunds - ordered product ID, quantity of the refund.
  • squareup_restock: This holds the data for the restocked items.
  • squareup_tax_rate_tax: This is currently a deprecated table which might be used in a future version.
  • squareup_token: This holds the relationships between your registered customers and their credit card tokens.
  • squareup_transaction: This holds all transactions created by the extension.