DSTNC Docs
  • Integrations
    • Shopify
    • Magento
    • WooCommerce
    • Wix (beta)
    • OpenCart
    • Squarespace
    • Shipstation
    • PrestaShop
    • CSV / Google Sheets
  • Brand Portal
    • Orders
      • Overview
      • Order details
      • Fulfill orders
      • Manually fulfill order
      • Fulfill part of an order manually
      • Fulfill multiple orders at the same time
      • Sorting unfulfilled orders
    • Payments
      • Supported Countries
      • Connect to Stripe
      • Getting Paid
      • How often you get paid
      • View Invoices
      • View Paid Invoices
      • Export Unpaid Invoices
      • Export Paid Invoices
      • View Payments
      • Export Payments
  • Returns
    • Page 1
Powered by GitBook
On this page
  1. Integrations

OpenCart

Our OpenCart integration is designed as an end-to-end model that allows us to pull in product details, inventory levels, and pricing and facilitate order placement.

OpenCart does not provide API access to sync product and inventory data. Therefore, you'll need to add the 'API connector' file to the web server that OpenCart is installed on.

In most cases, this can be done via the "cpanel" dashboard that is available from your hosting provider. If someone built and set up your store for you, it should only take a few minutes for them to set this up on your behalf.

  1. Copy the API connector code below, and save it as 'dstnc.php'. Copy the file into "/public_html/catalog/controller/api/jetti.php"

  2. To check the file worked, you should then be able to access the following URL: https://<your domain here>/index.php?route=api/dstnc/products

<?php
/*
Place this file in the following file (you'll need to create this file if it doesn't yet exist). 
  
  /public_html/catalog/controller/api/dstnc.php
  */
  
class ControllerApiJetti extends Controller {
  public function products() {
    $this->load->language('api/custom');
    $json = array();
    $this->load->model('catalog/product');
    // Get all products
    $products = $this->model_catalog_product->getProducts();
    foreach ($products as $product) {
        // Add the images for this product to the response
        $json['success']['images'][$product['product_id']] = $this->model_catalog_product->getProductImages($product['product_id']);
    }
    $json['success']['products'] = $products;
    $this->response->addHeader('Content-Type: application/json');
    $this->response->setOutput(json_encode($json));
  }
}
PreviousWix (beta)NextSquarespace

Last updated 1 year ago