Zen Follower
- Join Date:
- Jun 2007
- Location:
- Australia - Melbourne
- Posts:
- 306
- Plugin Contributions:
- 1
AJAX Image Swapper - Patch to swap between standard and AIS image display
This is how to make your product info page able to switch between AIS and normal Zen-Cart view. I didn't include this as an update since this method would make installation steps a bit harder, which I really don't want to do. Well unless if you found this patch is needed in core files, let me know.
Here it goes:
- Go to your includes/templates/YOUR_TEMPLATE/templates/tpl_modules_ajax_image_viewer.php file, cut this line of code from there:
2. Then go to tpl_product_info_display.php file, and paste that code block on top of the page
3. find:
```
require($template->get_template_dir('/tpl_modules_ajax_image_viewer.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_ajax_image_viewer.php');?>
replace it with:
```
if ($opt_id_used == null)
require($template->get_template_dir('/tpl_modules_main_product_image.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_main_product_image.php');
else
require($template->get_template_dir('/tpl_modules_ajax_image_viewer.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_ajax_image_viewer.php');?>
4. find:
```
require($template->get_template_dir('/tpl_modules_ajax_image_swapper_attr.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_ajax_image_swapper_attr.php'); ?>
replace it with:
```
if ($opt_id_used == null)
require($template->get_template_dir('/tpl_modules_attributes.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_attributes.php');
else
require($template->get_template_dir('/tpl_modules_ajax_image_swapper_attr.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_ajax_image_swapper_attr.php'); ?>
Jay
The greatest pleasure in life is doing what people say you cannot do.
Check on www.WebExtremeCustomiser.com for my modules (free contribution):
AJAX Image Swapper
AJAX Banner Swapper
Fixed Navigation