Webtytte Posted January 31, 2006 Share Posted January 31, 2006 Hi, I just installed the module "osCProductListingSelect for MS2 update1_1" and I want to make a small change to the listings... Current listing is like this: (Picture) (Name) (Price) <buy now button> Clicking (Picture) sends you to product info Clicking (Name) sends you to product info as well.. What I would like changed: 1) I would like to get the pop-up view when clicking (Picture) 2) I would like a new button to the left of the buy now button with <Details> and when you click on <Details> you are send to product info. Anyone able to help me with that? :) Thanks in advance! Kind regards Thomas Quote Link to comment Share on other sites More sharing options...
topiz Posted March 14, 2006 Share Posted March 14, 2006 ^ that would be very helpful to me, but i don't know that much of php or those things :( Quote Link to comment Share on other sites More sharing options...
Webtytte Posted March 15, 2006 Author Share Posted March 15, 2006 Is there really noone who can help me get this fixed? Maybe I can narrow this down.. 1) Which code is needed to change/add to get the javascript-popup when clicking a picture in the product overview, instead of getting directed to produt details? 2) Which code is needed (and where) to add a button ("Details") next to the "buy now"-button in the product overview? I really hope someone can help me out :) Kind regards Thomas Quote Link to comment Share on other sites More sharing options...
Webtytte Posted March 15, 2006 Author Share Posted March 15, 2006 Is there really noone who can help me get this fixed? Maybe I can narrow this down.. 1) Which code is needed to change/add to get the javascript-popup when clicking a picture in the product overview, instead of getting directed to produt details? 2) Which code is needed (and where) to add a button ("Details") next to the "buy now"-button in the product overview? I really hope someone can help me out :) Kind regards Thomas Actually I think I can fix no. 2 myself - but if someone could help me fix no. 1 I would be most gratefull Kind regards Thomas Quote Link to comment Share on other sites More sharing options...
Guest Posted March 15, 2006 Share Posted March 15, 2006 Actually I think I can fix no. 2 myself - but if someone could help me fix no. 1 I would be most gratefull Kind regards Thomas <?php echo '<input type="image" src="includes/languages/english/images/buttons/button_in_cart.gif" border="0" alt="Add to Cart" title=" Add to Cart ">'; ?> Quote Link to comment Share on other sites More sharing options...
topiz Posted March 17, 2006 Share Posted March 17, 2006 Is there really noone who can help me get this fixed? Maybe I can narrow this down.. 1) Which code is needed to change/add to get the javascript-popup when clicking a picture in the product overview, instead of getting directed to produt details? hey!! i got the first one!!! :D (since i think i don't need the 2? one, hehe :blush: ) 1. open: index.php and paste this code between the <head> tags. <script language="javascript"><!-- function popupWindow(url) { window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res izable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,le ft=150') } //--></script> 2. open: catalog/includes/modules/product_listing.php and find this code: case 'PRODUCT_LIST_IMAGE': $lc_align = 'center'; if (isset($HTTP_GET_VARS['manufacturers_id'])) { $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>'; } else { $lc_text = '?<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>?'; } break; 3. replace that code with this one: case 'PRODUCT_LIST_IMAGE': $lc_align = 'center'; if (isset($HTTP_GET_VARS['manufacturers_id'])) { $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>'; } else { $lc_text = ' <script language="javascript"><!-- document.write(\'<a href="javascript:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $listing['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], addslashes($listing['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>Click to enlarge</a>\'); //--></script> <noscript> <a href="' . tep_href_link(DIR_WS_IMAGES . $listing['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a> </noscript>'; } break; and that must be all, save files and enjoy! :D it works for me! Quote Link to comment Share on other sites More sharing options...
Webtytte Posted March 20, 2006 Author Share Posted March 20, 2006 Thanks a lot for your feeback Topiz! I got it to work, but not quite like you posted. Instead of putting the javascript code in the index.php, I put it in product_listing.php header. I also got the secondary objective done :) Thanks again, and if you wanna check it out see the result here: http://www.msdesign-shop.dk Kind regards Thomas Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.