Post by daveyoi » Thu Apr 26, 2018 6:28 pm

Hello Gang,

I am setting up a before event that needs to trigger for every method in a class including the default index method.

class @ /catalog/product/quote.php

Code: Select all

<?php
class ControllerCatalogProductQuote extends Controller {
	public function index() {
	
	}
	
	public function other() {
	
	}
	
	public function andanother() {
	}
}
My Event trigger is setup as

Code: Select all

catalog/controller/product/quote/*/before
Which works perfectly for the following routes
route="product/quote/other"
route="product/quote/andanother"

But does not get triggered on an index page request as
route="product/quote"

So now I have 2 event triggers

Code: Select all

catalog/controller/product/quote/*/before
catalog/controller/product/quote/before
Which just point to the same event action class - but it seems a little bit shit.. anyone else managed to have 1 trigger for all methods in a class including the default index method?

Image
Tristar Web Solutions


New member

Posts

Joined
Sun Oct 05, 2014 2:38 am
Who is online

Users browsing this forum: No registered users and 208 guests