I' trying to build this kind of pages:
- one page for each taxonomy term with taxonomy info and all commerce products related to term
- one 'products' page where users can click on a taxonomy image to view all the products in a box (loaded via ajax).
I have built taxonomy/term/* pages and the products page and they work fine but when I tried to add a product to cart (from taxonomy/term AND products pages.. ) drupal add the product to cart but always redirect me in the taxonomy/term page.
So I tried to setup a different form #redirect in hook_form_alter() but it work in a strange way: when I call taxonomy/term page via ajax to include it in products page now drupal serve me the product page itself like there is a all times redirect from taxonomy/term page to products page.
$form['#redirect'] = drupal_goto('products');
If I write
$form['#redirect'] = 'products';
just do not redirect.
How can I achieve a right redirect?
I'm working in D7 with drupal commerce to manage e-commerce