Fashion-Art Posted October 4, 2011 Share Posted October 4, 2011 Hi I wanna install the Shopping Cart as Tooltip addon. The instructions says that you have to make a change to 2 files. But when I download the addon, I only get a text file which only says to change one file. Where do I go wrong? Regards Michael Quote Link to comment Share on other sites More sharing options...
Guest Posted December 10, 2011 Share Posted December 10, 2011 Hi There, You need to change the stylesheet and the includes/footer.php file as well. Also very important to include the addon that makes it work with attributes. Hope this helps. ############################################################ ################ I N S T A L L A T I O N ################# ############################################################ /********************************/ /* STEP 1 */ /********************************/ Backup your files ! /********************************/ /* STEP 2 (Upload) */ /********************************/ Upload the file button_show_cart.gif to includes/languages/english/images/buttons (and any language your shop is working with) /********************************/ /*STEP 3 (Edit stylesheet.css)*/ /********************************/ 1 ) Go to the very end of the file Add directly AT THE END OF THE FILE #popCart { position: absolute; /*do not change this*/ top: 35%; left: 35%; width: 450px; background-color: #f8f8f8; border: 3px solid #BAC4D0; color: #000; z-index: 100000; /*do not change this*/ display: none; /*do not change this*/ padding: 20px; } ul.popcartList {list-style-type:none; margin:0; padding:0;} li.popcartButton {float:right;padding-right:10px;} #popCart_overlay { position: fixed; z-index:100; top: 0px; left: 0px; height:100%; width:100%; background-color: #000; display:none; opacity:0.75; filter:alpha(opacity=75); -moz-opacity: 0.75; } * html #popCart_overlay { /* ie6 hack */ position: absolute; height: expression(document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + 'px'); } /********************************/ /*STEP 4 (Edit includes/footer.php)*/ /********************************/ <!-- BOF - -= Cart on Product Page =- (This line only in Product Info, leave out in stylesheet) //--> <div id="popCart_overlay" onclick="document.getElementById('popCart').style.display='none'; document.getElementById('popCart_overlay').style.display='none'; return false;"> </div> <div id="popCart"> <?php if (tep_session_is_registered('new_products_id_in_cart')) { ?> <h4><?php echo PRODUCT_ADDED; ?></h4> <?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?> <ul class="popcartList"> <?php $cart_contents_string = ''; if ($cart->count_contents() > 0) { $products = $cart->get_products(); for ($i=0, $n=sizeof($products); $i<$n; $i++) { $cart_contents_string .= '<li>'; $cart_contents_string .= $products[$i]['quantity'] . ' x <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '">'; $cart_contents_string .= $products[$i]['name'] . '</a></li>'; } } echo $cart_contents_string; echo tep_draw_separator('pixel_black.gif', '100%', '1'); echo '<li><b>Total: ' . $currencies->format($cart->show_total()) . '</b></li>'; ?> </ul> <?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?> <ul class="popcartList"><li class="popcartButton"> <?php echo '<a href="javascript:void(0);" onclick="document.getElementById(\'popCart\').style.display=\'none\'; document.getElementById(\'popCart_overlay\').style.display=\'none\'; return false;">' . tep_image_button('button_continue_shopping.gif', IMAGE_BUTTON_CONTINUE_SHOPPING) . '</a></li><li class="popcartButton"><a href="' . tep_href_link(FILENAME_SHOPPING_CART, '', 'SSL') . '">' . tep_image_button('button_show_cart.gif', IMAGE_BUTTON_SHOW_CART) . '</a></li><li class="popcartButton"><a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_image_button('button_checkout.gif', IMAGE_BUTTON_CHECKOUT) . '</a>' ?></li></ul> <script type="text/javascript"> var item=document.getElementById("popCart"); function pop(el){ if(el.style.display=="block"){ el.style.display="none"; }else{ el.style.display="block"; } } pop(item); </script> <script type="text/javascript"> var item=document.getElementById("popCart_overlay"); function overlay(el){ if(el.style.display=="block"){ el.style.display="none"; }else{ el.style.display="block"; } } overlay(item); </script> <?php tep_session_unregister('new_products_id_in_cart'); } ?> </div> <!-- EOF - -= Cart on Product Page =- //--> Quote Link to comment Share on other sites More sharing options...
aurelou Posted October 10, 2016 Share Posted October 10, 2016 Hi all,This add-on is very usefull but how can we install it in the bootstrap version ? When I put the code in footer.php, it doesn't work and cuts the footer. I installed it in my old 2.2 version shop and it was very usefull. Thank you very much. Quote Link to comment Share on other sites More sharing options...
greasemonkey Posted October 10, 2016 Share Posted October 10, 2016 Ya, this is an antique... and won't work with with boostrap. I believe this one will work (I've never tried it). http://addons.oscommerce.com/info/7657 Quote Link to comment Share on other sites More sharing options...
aurelou Posted October 11, 2016 Share Posted October 11, 2016 Thank you very much, I didn't try to install the add-on you mentioned but found that there's an error in code in the installation notice from Shopping cart as tooltip : On this line : <h4><?php echo PRODUCT_ADDED; ?></h4> On the installation file it's written echp and not echo. So we have to correct it to make it work. Now technically it works, but there's a lot of css adaptations to make. I don't understand why so few people use this add-on whereas all big shops have a little tooltip when adding product to cart. In Oscommerce when we set to false "show cart after adding product", I find it not clear that the product has been added to the cart. And I also don't like to go to the cart for each product. Quote Link to comment Share on other sites More sharing options...
burt Posted October 11, 2016 Share Posted October 11, 2016 This message appears when a product is added to cart (for sure in Edge, Gold also I think - could be wrong I have not looked at Gold for year):And if you want to do something more, there are many things possible, here are two:this popup shows when the cart link is clickedthis tooltip shows when the cart link is clickedIt's important to leave old addons behind.Use the new structure, the new system ... and you make your life much easier. Quote Link to comment Share on other sites More sharing options...
aurelou Posted October 11, 2016 Share Posted October 11, 2016 Yes the green message appears but when we are at the bottom of the page we don't see it. Your first option is exactly what I want ! How to do it ? And you're right, this old add-on is not very cool... I didn't manage to make it responsive so I simply hid it in the small and medium sizes. Quote Link to comment Share on other sites More sharing options...
Kevin.Dallas Posted October 2, 2018 Share Posted October 2, 2018 (edited) good day, I am having issues on popup add to cart, on click add to cart ads second item on click ads the same item qty 2 click on different items still ads same item advanced_search_result.php works fine case 'PRODUCT_ADD_CART': if ($listing['products_quantity']){ $a_cart = '' . tep_draw_button(IMAGE_BUTTON_ADD_CART, 'fa fa-shopping-cart', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now' . '', 'SSL'), NULL, NULL, 'btn-success btn-sm listbuy-sm') . ''; } else { $a_cart = '<span class="productSpecialPrice">'.out_a_stocks('','out a stocks','','','') . '</span>'; } break; ---------------------------------------------------------------- case 'PRODUCT_ADD_CART': if (($listing['products_quantity']<>0) and ($listing['products_quantity'] > 0)){ $a_cart = '' . tep_draw_button(IMAGE_BUTTON_ADD_CART, 'fa fa-shopping-cart', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id'], '', 'SSL'), NULL, NULL, 'btn-success btn-sm listbuy-sm') . ''; } else { $a_cart = '<span class="productSpecialPrice">'.out_a_stocks('','out a stocks','','','') . '</span>'; } break; Edited October 2, 2018 by Kevin.Dallas Quote Link to comment Share on other sites More sharing options...
Kevin.Dallas Posted October 2, 2018 Share Posted October 2, 2018 i found the issue, upon adding a item what it does is, add a link on the toolbar for example: ?products_id=1093&sort=10a now you adding another item in the shopping cart the id doesn't change is stays the same and add the same item in the shopping cart, i'll give you guys update once i fix it 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.