Search found 4 matches

Page 1 of 1

Search found 4 matches

Re: Stop action and Return message alert with opencart event

pointless to use events for peanut changes like this. From https://github.com/opencart/opencart/wiki/Modification-System As of OpenCart 3.1.0.0+ OCMOD will be removed from the OpenCart source code. Only the event system will be used for modifications. This is why I want to learn how we can use the ...

Jump to post
  • Wed Sep 30, 2020 1:44 am
  • Replies 9
  • Views 582
Re: Stop action and Return message alert with opencart event

Do you want all input carried back to the view or just halt execution? Simple to just stop execution of the code, if you want an error message on model needing to be unique its more involved. As much as I prefer events, this can be done with ocmod on the validate method in few lines of code. All in...

Jump to post
  • Wed Sep 30, 2020 1:37 am
  • Replies 9
  • Views 582
Re: Stop action and Return message alert with opencart event

The $this->session->data['error'] does not exist in the core from admin/controller/catalog/product.php file. You'd need to create this session super global name in your /before event. Then, in your /after event, to output the captured error into your $output referenced variable into your TWIG strin...

Jump to post
  • Tue Sep 29, 2020 9:38 am
  • Replies 9
  • Views 582
Stop action and Return message alert with opencart event

I want to make model field unique and I have create a event for this! My dificulty is to stop adding or update action and return an error if the model already exist in event model before addProduct or before editProduct.

Any suggestions will be greatly appreciated,

OC Version:3.0.2.0

Jump to post
  • Sat Sep 26, 2020 7:50 am
  • Replies 9
  • Views 582

Page 1 of 1

Search found 4 matches