ce7 Posted September 18, 2018 Share Posted September 18, 2018 hi I have 234.1Edge (BS) installed with few addons. I notice that in the shopping cart page, there are 2 tiny button, blue one is to update the shopping cart and red one is to delete the product. How can I modify the button size to make it bigger and how can I tag (when mouse point to that buttons, have some text to let user know what that button is for...), please let me know which file and file direction that I can check and try it. Thanks! Lyn Link to comment Share on other sites More sharing options...
♥Tsimi Posted September 18, 2018 Share Posted September 18, 2018 in your shopping_cart.php file look for this code around line 100 $products_name .= '<br>' . tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'style="width: 65px;" min="0"', 'number') . tep_draw_hidden_field('products_id[]', $products[$i]['id']) . ' ' . tep_draw_button(CART_BUTTON_UPDATE, 'fas fa-sync', NULL, NULL, NULL, 'btn-info btn-xs') . ' ' . tep_draw_button(CART_BUTTON_REMOVE, 'fas fa-times', tep_href_link('shopping_cart.php', 'products_id=' . $products[$i]['id'] . '&action=remove_product'), NULL, NULL, 'btn-danger btn-xs'); remove the btn-xs class from both buttons so that it looks like this $products_name .= '<br>' . tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'style="width: 65px;" min="0"', 'number') . tep_draw_hidden_field('products_id[]', $products[$i]['id']) . ' ' . tep_draw_button(CART_BUTTON_UPDATE, 'fas fa-sync', NULL, NULL, NULL, 'btn-info') . ' ' . tep_draw_button(CART_BUTTON_REMOVE, 'fas fa-times', tep_href_link('shopping_cart.php', 'products_id=' . $products[$i]['id'] . '&action=remove_product'), NULL, NULL, 'btn-danger'); now you should have bigger update and delete buttons. For the popup on mouse over you could use tooltips to show what the buttons actually do. Check here for more info https://getbootstrap.com/docs/3.3/javascript/#tooltips For example something like this $products_name .= '<br>' . tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'style="width: 65px;" min="0"', 'number') . tep_draw_hidden_field('products_id[]', $products[$i]['id']) . ' ' . tep_draw_button(CART_BUTTON_UPDATE, 'fas fa-sync', NULL, NULL, NULL, 'btn-update btn-info data-toggle="tooltip" data-placement="top" title="' . TEXT_BUTTON_UPDATE . '"') . ' ' . tep_draw_button(CART_BUTTON_REMOVE, 'fas fa-times', tep_href_link('shopping_cart.php', 'products_id=' . $products[$i]['id'] . '&action=remove_product'), NULL, NULL, 'btn-delete btn-danger data-toggle="tooltip" data-placement="top" title="' . TEXT_BUTTON_DELETE . '"'); At the very bottom of the shopping_cart.php file add <script>$(function () { $('.btn-update, .btn-delete').tooltip() })</script> Then add the language definitions and that's it. define('TEXT_BUTTON_UPDATE', 'Update cart'); define('TEXT_BUTTON_DELETE', 'Remove item'); Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.