Installation Instructions for OpenCart 3.x

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

Installation Instructions

  1. Unzip the downloaded Square .ZIP file into a new directory
  2. In your OpenCart admin panel go to Extensions > Extension Installer
  3. Click on the Upload button.
  4. Upload the file squareup.ocmod.zip which is in the directory you created in step 1.
  5. Go to Extensions > Payments > Square and click the Install button. The page will be refreshed and Edit button will show up.
  6. Click on the Edit button.
  7. The control panel is displayed. Now, this is the place where you configure your Square module. Try clicking around the menu items to get acquainted with the module.

Congratulations! Square is now installed.

Manual Installation

  1. Unzip the downloaded Square .ZIP file into a new directory
  2. Navigate to this directory and find the file squareup.ocmod.zip
  3. Extract squareup.ocmod.zip into a new directory
  4. Navigate to the newly extracted directory. You will notice it contains a directory called upload/
  5. Upload the contents of the upload/ directory to your OpenCart installation, making sure to preserve the directory structure.
  6. Go to Extensions > Extensions > Payments > Square and click the Install button. The page will be refreshed and Edit button will show up.
  7. Click on the Edit button.
  8. The control panel is displayed. Now, this is the place where you configure your Square module. Try clicking around the menu items to get acquainted with the module.

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 one of the above installation methods
  2. Go to Extensions > 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 following events will be applied to your OpenCart:

  • admin/controller/*/after => extension/payment/squareup/setAdminURL - This is an event handler triggered once per admin panel request because admin directory name may get modified while a CRON job is registered. This method sets payment_squareup_admin_url_transaction and payment_squareup_admin_url_settings required by the Square catalog method ControllerExtensionPaymentSquareup::info().

  • admin/view/common/column_left/before' => extension/payment/squareup/setAdminLink - This adds a link to the Square extension in the admin menu.

  • admin/view/catalog/product_form/before' => extension/payment/squareup/setProductWarning - This loads the warning message about the product quantity editing addition to the product view.

  • catalog/model/checkout/order/addOrderHistory/before' => extension/payment/squareup/beforeAddOrderHistory - This adds the order data to the Square extension.

  • catalog/model/checkout/order/addOrderHistory/after' => extension/payment/squareup/afterAddOrderHistory - This process the data after the order history is updated via Square or OpenCart.

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.