random_user_name
random_user_name

Reputation: 26180

Open Cart Admin Interface Development

I have been tasked with integrating an Open Cart installation with an order fulfillment vendor (via the vendor's API). This will require an admin interface for my admin users in OC in order to do various things with the orders with respect to the API.

The API itself is simple enough, and if this were not integrating with Open Cart, would be no challenge at all.

The questions I have are:

  1. Is there any good developers documentation out there? I've come up dry in my Google searches for good developers documentation.

  2. How can I add an admin menu item to the admin header menu? Ideally I would create a sub-menu under "Sales" called something like "Fulfillment". However, there does not seem to be a method of adding an Admin menu without modifying "core" Open Cart files. If I have to modify admin/view/template/common/header.tpl in order to add an Admin menu item, won't upgrading OC in the future overwrite those changes?

  3. Are there functionalities for storing settings? Meaning if I develop this as an extension/module, is there a simple set of functions/methods I can call to create, read, update, and delete settings? (Such as the API credentials I will need to use)

  4. I have been thinking of this in terms of writing a module, but every example I see of an OC module (when I view it in the dashboard, under Extensions->Modules->[Module Name] seems to involve layouts, position, etc. on the front-end, and no admin interface other than through the "modules" menu item. What am I missing?

Upvotes: 0

Views: 1851

Answers (1)

Jay Gilford
Jay Gilford

Reputation: 15151

  1. The best thing available is the standard documentation on the opencart site, though that leaves much to be desired
  2. There are two methods at present. Edit the files directly or use vQmod
  3. Yes, you can use the $this->model_setting_setting->editSetting() model method to save your settings. See admin/model/setting/setting.php for the code that it runs. Also, you should look at how the controller files of the default modules in the admin use it
  4. You don't necessarily have to have a front end version. You can create a module just making sure your mod's key_enabled doesn't become 1 via your settings (in other words force it to always be 0 when you save and the module will never be called upon on the client side)

Upvotes: 1

Related Questions