ultrandy Posted May 7, 2010 Share Posted May 7, 2010 My add to cart button (and probably yours lol) is <?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?> Is there a non-php version of the script? Or does it need to be in php? I mean just a standard <form> version? THank you so much for your help!! :rolleyes: :lol: :-" :thumbsup: Link to comment Share on other sites More sharing options...
gioyfa Posted May 7, 2010 Share Posted May 7, 2010 My add to cart button (and probably yours lol) is <?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?> Is there a non-php version of the script? Or does it need to be in php? I mean just a standard <form> version? THank you so much for your help!! :rolleyes: :lol: :-" :thumbsup: Andy, if you will open with an editor the file html_output.php (in includes->functions folder), and search for function "tep_draw_hidden_field", you'll see that this call the only thing that is doing is just to write with echo the code. So if you want, you can write it by yourself without using this function, the only reason that you use these ready functions is to not always write lot of code and have a standard type, but you can alter them as you want :) Link to comment Share on other sites More sharing options...
npn2531 Posted May 7, 2010 Share Posted May 7, 2010 My add to cart button (and probably yours lol) is <?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?> Is there a non-php version of the script? Or does it need to be in php? I mean just a standard <form> version? THank you so much for your help!! :rolleyes: :lol: :-" :thumbsup: It does seem like it would be far simpler to use html to create a submit button. However, if you start replacing the seemingly indecipherable 'html as php' OSCommerce 'sphaghetti' code, it won't be long before your cart, for about a dozen reasons I could list and a dozen more beyond that, is a mess that's hard to work with. It is not easy to figure out the class functions and tep_stuff but once you do, you begin to appreciate how efficient this coding is. What specifically are you trying to accomplish? Oscommerce site: OSC to CSS, http://addons.oscommerce.com/info/7263 -Mail Manager, http://addons.oscommerce.com/info/8120 Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.