2.1 determining page location with AJAX product options

Previously, all the product options were loaded onto the page and switched with js. Now the options are pulled with an AJAX call.

This is an issue.

On the product details page when the page loads: controller=product mode=view

On the category list page when the page loads: controller=categories mode=view

This is great, you can determine the page based on those variables for hooks and mods.

BUT, when you click an product variant, it reloads the entire product data section and has to access the hooks all over again.

When this happens (besides being slower) the controller=product mode=options.

This is the case on the product details and category list page. So how are you supposed to determine what page it is accessing in the hooks? If you want to display stuff differently on those pages, I don’t see how to make the determination for the AJAX call :confused:

Any ideas?

After reviewing \controllers\common\products.post.php I discovered:

```php $_REQUEST[‘appearance’][‘details_page’] ```

which is 1 or null. YAY :cool: