Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

opencart-manager

Node.js package written in Typescript that allows you to manage your opencart store data easily. Create products, attach categories or extract existing entities to edit them. Multilanguage supported.

Installation

npm i opencart-manager

Usage

import opencartManager from 'opencart-manager';

// This is a dummy example usage
// Will make complete documentation soon

const opencart = opencartManager({
    host: 'host',
    user: 'user',
    password: 'password',
    database: 'database',
});

// Create new product
const product = opencart.product.create()
    .setData({ price: 800 })
    .setDescription({ languageId: 1, name: 'Apple iPhone X 256GB' })
    .setDescription({ languageId: 2, name: 'Apple iPhone X 256ГБ' })

await product.insert();

// Attach product to an existing category
const category = await opencart.category.extract({ categoryId: 1 });
await product.toCategory(category);

// Update product
product.setData({ quantity: 250 });
await product.update();

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

About

Node.js package helping to manage your opencart store data easily.

Topics

Resources

Stars

3 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages