Results 1 to 7 of 7
  1. #1
    Join Date
    Jun 2007
    Location
    Australia - Melbourne
    Posts
    310
    Plugin Contributions
    6

    Default 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:
    1. Go to your includes/templates/YOUR_TEMPLATE/templates/tpl_modules_ajax_image_viewer.php file, cut this line of code from there:
      Code:
      <?php
      include(DIR_WS_MODULES . 'AJAX_image_swapper.php');
      ?>
    2. Then go to tpl_product_info_display.php file, and paste that code block on top of the page
    3. find:
      Code:
      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:
      Code:
      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:
      Code:
      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:
      Code:
      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'); ?>
    Cheers,

    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

  2. #2
    Join Date
    Jul 2006
    Location
    SF Bay Area
    Posts
    867
    Plugin Contributions
    1

    Default Re: AJAX Image Swapper - Patch to swap between standard and AIS image display

    Thank you! Very nice mod :)

    I see in your road map you may make AIS work hand-in-hand with Image Handler2. Any word on that?

    Peace;

    Kiddo

  3. #3
    Join Date
    Jun 2007
    Location
    Australia - Melbourne
    Posts
    310
    Plugin Contributions
    6

    Default Re: AJAX Image Swapper - Patch to swap between standard and AIS image display

    Hey, thanks!

    Well, heheh... haven't really got time to even start working on that I haven't even installed Image Handler2 nor knowing what its functions are, yet.
    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

  4. #4

    Default Re: AJAX Image Swapper - Patch to swap between standard and AIS image display

    Hello Jay,,

    Your mod is really cool. But i have made a movement to my zen cart ,, Finally , I can not get the image shown on Product_info page. And what is more , I get the error that when i inject the SQL..

    1146 Table 'china.configuration_group' doesn't exist
    in:
    [SELECT @last_id :=last_insert_id() FROM configuration_group;]
    If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.


    I notice this problem caused with the below code.

    UPDATE configuration_group SET sort_order = last_insert_id() WHERE configuration_group_id = last_insert_id();

    SELECT @last_id :=last_insert_id() FROM configuration_group;

    And in the Admin/catalog/Ajax image... show that your version is V1.2 not 2.1 .. But i have download the 2.1 from your webpage.

    So the currently version is not compatible with IH2 and No attributor items .??

    But thanks for you help... I will try until you finally got the above mod work with yours together...

    Regards,

  5. #5
    Join Date
    May 2007
    Posts
    114
    Plugin Contributions
    0

    Default Re: AJAX Image Swapper - Patch to swap between standard and AIS image display

    Quote Originally Posted by adam9110 View Post
    Hello Jay,,

    Your mod is really cool. But i have made a movement to my zen cart ,, Finally , I can not get the image shown on Product_info page. And what is more , I get the error that when i inject the SQL..

    1146 Table 'china.configuration_group' doesn't exist
    in:
    [SELECT @last_id :=last_insert_id() FROM configuration_group;]
    If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.


    I notice this problem caused with the below code.

    UPDATE configuration_group SET sort_order = last_insert_id() WHERE configuration_group_id = last_insert_id();

    SELECT @last_id :=last_insert_id() FROM configuration_group;

    And in the Admin/catalog/Ajax image... show that your version is V1.2 not 2.1 .. But i have download the 2.1 from your webpage.

    So the currently version is not compatible with IH2 and No attributor items .??

    But thanks for you help... I will try until you finally got the above mod work with yours together...

    Regards,
    change this line:

    SELECT @last_id :=last_insert_id() FROM configuration_group;

    to

    SELECT @last_id :=last_insert_id() FROM zen_configuration_group;


    worked for me..

  6. #6
    Join Date
    Jun 2007
    Location
    Australia - Melbourne
    Posts
    310
    Plugin Contributions
    6

    Default Re: AJAX Image Swapper - Patch to swap between standard and AIS image display

    Quote Originally Posted by greenhat View Post
    change this line:

    SELECT @last_id :=last_insert_id() FROM configuration_group;

    to

    SELECT @last_id :=last_insert_id() FROM zen_configuration_group;


    worked for me..
    Lets see... with

    SELECT @last_id :=last_insert_id() FROM zen_configuration_group;

    If you use other prefix than zen_ it wouldn't work.

    `configuration_group` might work, ugh should I change the installation sql again?
    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

  7. #7
    Join Date
    Jul 2010
    Posts
    2
    Plugin Contributions
    0

    Idea or Suggestion Re: AJAX Image Swapper - Patch to swap between standard and AIS image display

    I installed the latest 3.1.4, product information found in a blank page, how to solve it? Thanks!

 

 

Similar Threads

  1. Any way to import image massively to AJAX Image Swapper ?
    By mybiz9999 in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 17 Sep 2010, 04:35 PM
  2. My solution for incompatibility between Ceon URI mapping and Ajax Swapper Image
    By mybiz9999 in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 4 Aug 2010, 07:56 AM
  3. Is there any way to massivly upload image to Ajax Image swapper?
    By mybiz9999 in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 26 Jul 2010, 03:38 PM
  4. Error on AJAX IMAGE Swapper
    By easy665 in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 28 Aug 2009, 02:38 PM
  5. Conflict betweeen Ajax Image Swapper and Tabbed Products Pro
    By Prophotoboy in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 8 Oct 2008, 09:55 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR