robster2 Posted July 24, 2014 Share Posted July 24, 2014 Hi all I would like to change the "quantity update button" in the shopping cart to a text link just like the remove link beside it, how can this be done? Thanks in advance Rob Link to comment Share on other sites More sharing options...
RMD27 Posted July 24, 2014 Share Posted July 24, 2014 Edit the code on the shopping_cart.php directly. In your filemanger in cPanel. Link to comment Share on other sites More sharing options...
robster2 Posted July 24, 2014 Author Share Posted July 24, 2014 No shit Sherlock.. the point is how to get the update function to work with a text link instead of a tep_draw button. Lots of info here on how to remake a text link to a button but not the other way. Link to comment Share on other sites More sharing options...
multimixer Posted July 24, 2014 Share Posted July 24, 2014 The update button is submitting the form on shopping_cart.php, it is not a link "masked" to look like a button, it IS a button My community profile | Template system for osCommerce - New: Responsive | Feedback channel Link to comment Share on other sites More sharing options...
MrPhil Posted July 24, 2014 Share Posted July 24, 2014 So if it is a true button, it is submitting to a form, rather than linking to a new page. It's a considerable chore to change a button to a link or vice-versa. Link to comment Share on other sites More sharing options...
robster2 Posted July 25, 2014 Author Share Posted July 25, 2014 Well I figured out that to copy the "remove" code and make an action=submit could be a solution just dont know exactly how something like: From: <a href="' . tep_href_link(FILENAME_SHOPPING_CART, 'products_id=' . $products[$i]['id'] . '&action=remove_product') . '"> To: <a href="' . tep_href_link(FILENAME_SHOPPING_CART, 'cart_quantity=' . $products[$i]['id'] . '&action=submit') . '"> As you can see my php knowledge is 0 but it should be possible somehow Im sure. Link to comment Share on other sites More sharing options...
multimixer Posted July 25, 2014 Share Posted July 25, 2014 You can't do that, because action=submit means nothing to the script, unless you want to set this in application_top.php and I don't know what else would be necessary Conclusion: forget about removing the submit button of the form Only way is, to "un-style", or "re-style" it with css, so it doesn't look like a button any more Wrap it into a selector, like e.g. "no_button" and then target it in css like .no_button button{background:none;border:none;} and any other rules you want My community profile | Template system for osCommerce - New: Responsive | Feedback channel Link to comment Share on other sites More sharing options...
robster2 Posted July 25, 2014 Author Share Posted July 25, 2014 Ok thanks, with the selector, do you mean like no_button instead of tep_draw_button, If so how do i proceed? Have tried to style the button in css by labeling it like "null, 'secondary123' but It can only control borders, background and font weight, hover and text size is not possible. Thanks in advance! Link to comment Share on other sites More sharing options...
multimixer Posted July 25, 2014 Share Posted July 25, 2014 With "selector" I mean to wrap in into a html element and give a class to that element. <div class="kuku"> the button </div> In this case you target like .kuku button {} in css You can also give a class to the button itself, adding parameters to the end of the button function array('params'=> 'class="kuku"') Here you target like button.kuku{} in css I'm using "kuku" to make clear that the class name has no effect, it is just anything My community profile | Template system for osCommerce - New: Responsive | Feedback channel Link to comment Share on other sites More sharing options...
robster2 Posted July 28, 2014 Author Share Posted July 28, 2014 Works like a dream, Thanks!! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.