Search found 226 matches

Search found 226 matches

Re: Favicon

I add this line <link rel="icon" type="image/x-icon" href="/image/favicon.ico"> in header.twig it is work now I just tried to get the favicon working in 4.0.2.1 but I guess they removed the favicon line from the headers.twig or simply forgot to add them. Without any re...

Jump to post
  • Sun May 14, 2023 2:50 pm
  • Replies 21
  • Views 8400
Re: Updating extension without losing data?

I tried using the uninstall method but this won’t work. Even if I try to get all settings in the first line of the method I get an empty array. So the module settings are cleared before I can get them. So I added the logic of saving the settings in the Save method instead. And this works fine. Each ...

Jump to post
  • Thu May 11, 2023 2:53 am
  • Replies 17
  • Views 5315
Re: Updating extension without losing data?

Hi Reptile, in your case the easiest way would be to write a couple of small functions in your plugin(s), called install() and uninstall(), they must be placed in the (admin) controller of your extension. Opencart calls them automatically when you install/uninstall your extension, you don't have to...

Jump to post
  • Wed May 10, 2023 12:45 am
  • Replies 17
  • Views 5315
Re: Updating extension without losing data?

Unfortunately there is no built-in way in OpenCart 4 (that I know of) to upgrade an existing extension without loosing all its data. IMHO the current way OpenCart 4 implements the installation of extensions is poorly implemented. This is just one of many issues which need to be addressed. In genera...

Jump to post
  • Tue May 09, 2023 5:07 am
  • Replies 17
  • Views 5315
Re: Updating extension without losing data?

Each versions are different, even by features. Forum rules. Ok 4.0.2.1 then :P Still, at this time, it has been suggested many times by forum supporters that OC v4.x releases not to use it until a stable version gets released. I understand that. But it is good to convert atleast one extension just ...

Jump to post
  • Mon May 08, 2023 12:26 am
  • Replies 17
  • Views 5315
Re: Updating extension without losing data?

The OC version still hasn't been posted. By building an API, this can be accomplished. There are lots of extensions on the Marketplace that can accomplish update automations already. I would suggest to take a look. What do you mean by the oc version hasn’t been posted? I’m posting in the Opencart 4...

Jump to post
  • Mon May 08, 2023 12:04 am
  • Replies 17
  • Views 5315
Re: Updating extension without losing data?

I don't think you guys understand my question. As from now my extension is installed through the extension installer and show there with a version number let's say version 1.0. Now if I update my extension and make a version 1.1 you can't install this through the extension installer as you get a er...

Jump to post
  • Sun May 07, 2023 10:54 pm
  • Replies 17
  • Views 5315
Re: Updating extension without losing data?

I don't think you guys understand my question. As from now my extension is installed through the extension installer and show there with a version number let's say version 1.0. Now if I update my extension and make a version 1.1 you can't install this through the extension installer as you get a err...

Jump to post
  • Sun May 07, 2023 5:21 pm
  • Replies 17
  • Views 5315
[SOLVED] Updating extension without losing data?

I just finished my first event driven extension and was wondering how I can update this if I release a new version? Normally with VQMod clients would simply overwrite the files and stored data wouldn’t be affected. But now the extension is installed through the extension installer and the only way t...

Jump to post
  • Sat May 06, 2023 2:19 pm
  • Replies 17
  • Views 5315
Re: Trigger path

halfhope wrote:
Sun Apr 30, 2023 2:44 am
UPD: sorry.
catalog/controller/extension/opencart/module/featured/before
Yes thanks!
That helped.
The path I used is:

Code: Select all

admin/view/extension/opencart/dashboard/recent_info/after

Jump to post
  • Sun Apr 30, 2023 2:23 pm
  • Replies 5
  • Views 1581
Re: Trigger path

Hi! Just check oc_event table. Also might be helpful https://forum.opencart.com/viewtopic.php?t=227710&start=20#p839606 Thanks for the article. I've already checked the event table but almost all references are to models. But I still can't find an answer to my question. The paths to catalog and...

Jump to post
  • Sun Apr 30, 2023 12:04 am
  • Replies 5
  • Views 1581
[SOLVED] Trigger path

I'm almost done with my first event system extension. Only I still don't really understand how some paths works. For example I'm trying to modify something on the main admin dashboard. These files are located in the extension folder. I can't figure out what the trigger path is to: extension/opencart...

Jump to post
  • Sat Apr 29, 2023 10:54 pm
  • Replies 5
  • Views 1581
Re: What happened to the invoice styling?

Nevermind. Found the problem. In the order_invoice.twig Simply replace: <link href="{{ bootstrap_css }}" type="text/css" rel="stylesheet" media="screen"/> With: <link href="{{ bootstrap_css }}" type="text/css" rel="stylesheet"/>

Jump to post
  • Sat Apr 29, 2023 6:39 pm
  • Replies 3
  • Views 1381
[SOLVED] What happened to the invoice styling?

What happened to the invoice styling?
As from Opencart 4.x the invoice got new styling and it looks ok.
But when you want to print the invoice there is no styling what so ever.
Is this a know problem?

Jump to post
  • Fri Apr 28, 2023 9:53 pm
  • Replies 3
  • Views 1381
Re: Using event to change controller code

You won't see other variables than $data or $json in the event controllers. For that, you need to re-query it. Isn't it possible to use a second event trigger to modify the sale/order controller invoice method to insert the extra variables? Just like I would do with VQMod? I already tried it but I ...

Jump to post
  • Mon Apr 24, 2023 10:55 pm
  • Replies 15
  • Views 3541
Re: Using event to change controller code

You won't see other variables than $data or $json in the event controllers. For that, you need to re-query it. Isn't it possible to use a second event trigger to modify the sale/order controller invoice method to insert the extra variables? Just like I would do with VQMod? I already tried it but I ...

Jump to post
  • Mon Apr 24, 2023 10:25 pm
  • Replies 15
  • Views 3541
Re: Using event to change controller code

If you print_r the $data array directly from your method, does it output the array that includes your custom invoice? At the top you can only see the saved data for the invoice. And below that a whole lot of what looks like the view translation files. Here is a small part of the print_r: Array ( [t...

Jump to post
  • Mon Apr 24, 2023 9:54 pm
  • Replies 15
  • Views 3541
Re: Using event to change controller code

This is the trigger: public function install() { $this->load->model('setting/event'); $this->model_setting_event->addEvent([ 'code' => $this->extension_name, 'trigger' => 'admin/view/sale/order_invoice/after', 'action' => 'extension/custominvoice/module/custom_invoice.invoice', 'description' => '', ...

Jump to post
  • Mon Apr 24, 2023 2:11 pm
  • Replies 15
  • Views 3541
Re: Using event to change controller code

Usually you should be able to add or modify data in an event handler for the trigger 'admin/view/sale/order_invoice'. Yes this I understand but this will mean that I have to copy the complete contents of the invoice function from the sale/order controller. This does work. But doesn't seems logical ...

Jump to post
  • Mon Apr 24, 2023 4:29 am
  • Replies 15
  • Views 3541
Re: Using event to change controller code

Usually you should be able to add or modify data in an event handler for the trigger 'admin/view/sale/order_invoice'. Yes this I understand but this will mean that I have to copy the complete contents of the invoice function from the sale/order controller. This does work. But doesn't seems logical ...

Jump to post
  • Mon Apr 24, 2023 12:45 am
  • Replies 15
  • Views 3541

Search found 226 matches