Hi All,
Hopefully someone can help me out here.
I have a Zend Router that handles adding stuff to the basket. Now i'm building a customiser module, so the user can add as many parts, in different colors, on specified sections of the product.
My basic url is like this
http://www.domain.com/shop/add/custom/size/type
My current router.ini is like this
resources.router.routes.shopAddCustom.route = shop/add/custom/:size/:type/*
resources.router.routes.shopAddCustom.defaults.module = shop
resources.router.routes.shopAddCustom.defaults.controller = order
resources.router.routes.shopAddCustom.defaults.action = add
resources.router.routes.shopAddCustom.defaults.product = builder
What i would really like to acommodate are urls like this.
http://www.domain.com/shop/add/custom/size/type/part3/blue/right/part2/part6/both/part7/red/part1/left/orange/
Basicly the everything behind size/type/ is a part, a color or a section (right, left, both)
How can i get a single array of all url-path-parts after size/type?
array(0 => 'part3', 1 => 'blue', 2 => 'right', 3 => 'part2', 4 => 'part6' [...] );
If i just use $this-_request->getParams();
i get an array like this
array('part3' => 'blue', 'right' => 'part2', 'part6' => 'both' [...] );
I could run through that array, adding all keys and values as values in a new array. Problem is, if the number of url-path-parts is odd the last part will not be returned to the params, as it is seen as a empty variable, thus not added to the params array.
Any ideas is much apreciated :)