Skip to content
This repository has been archived by the owner on May 25, 2023. It is now read-only.

Integrate DUELL POS with your OpenCart 3.x webshop

License

Notifications You must be signed in to change notification settings

syntaxerror/duell-opencart-3x

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Duell opencart-3x module

The purpose of this module is to manage & sync stocks at both opencart 3.x webshop and Duell.

Prerequisites

This module requires opencart 3.x.

  • If you want to use this module with opencart 1.x version, please use 1.x.
  • If you want to use this module with opencart 2.x version, please use 2.x.

Installation

Step 1: Download the Module

Download the module files.

Step 2: Upload the Module

  • Please take backup of catalog > model > checkout > order.php If you don't want to replace file then add below code to above mentioned file.

    Find below function

    public function addOrderHistory

    Find below line

    if (!in_array($order_info['order_status_id'], array_merge($this->config->get('config_processing_status'), $this->config->get('config_complete_status'))) && in_array($order_status_id, array_merge($this->config->get('config_processing_status'), $this->config->get('config_complete_status')))) {

    Add below code at the end of if condition. Make sure inside the code is inside above mentioned if condition

    /*
    * Duell Stock sync
    */
    $this->load->library('duell/duell');
    $result = $this->duell->callDuellStockUpdate($order_products);
  • Upload code to the opencart root directory.

Step 3: Give access to module

  • Take login into admin area.
  • Goto System > Users -> User Groups > Edit "Administrator" user group
  • Check checkbox in Access Permission
    extension/module/duell_integration 
  • Check checkbox in Modify Permission
    extension/module/duell_integration  
  • Save group.

Step 4: Enable the Module

  • Goto > Extensions > Extensions > Choose extension type "Modules"
  • Find "Duell Integration"
  • Click on "+" icon to activate the module.

Step 5: Setup duell credential

Note: Make sure you have API related access in Duell application. Find the below details in duell manager area > API-oppsett

  • Client Number: Required for API authentication
  • Client Token: Required for API authentication
  • Department Token: Copy the department token in which stock need to manage.
  • Log Enable: In case of enable, it will show all API call logs in opencart logs.
  • Status: Stock only manage if this flag is enabled

Step 6: Setup cron job with CURL

  • Every 3 hours

    * */3 * * * /usr/bin/curl http://<YOURWEBSHOP.COM>/system/duellcron.php >/dev/null 2>&1
  • Every night 3am

    * 3 * * * /usr/bin/curl http://<YOURWEBSHOP.COM>/system/duellcron.php >/dev/null 2>&1

Note: Make sure .htaccess file inside system folder have below code.

Find below code

<Files *.*>
  Order Deny,Allow
  Deny from all
</Files>

Add below code

<Files "duellcron.php">
    Allow from all
</Files>

LICENSE

The module is open source, and made available via an 'GNU GENERAL PUBLIC LICENSE', which basically means you can do whatever you like with it as long as you retain the copyright notice and license description - see LICENSE for more information.

About

Integrate DUELL POS with your OpenCart 3.x webshop

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 90.3%
  • HTML 9.7%