Giter Club home page Giter Club logo

duell-opencart-3x's Introduction

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.

duell-opencart-3x's People

Contributors

kgpanteon avatar syntaxerror avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.