kajoka Posted December 16, 2010 Share Posted December 16, 2010 Hello, I am currently working with osCommerce 2.3.1 and try to adapt the wishlist contrib (http://addons.oscommerce.com/info/1682). It works fine so far, but the current tep_image_submit call I am using is not using the button style sheet, which is used in osCommerce 2.3.1. But this style is used with the tep_draw_button call. So my idea is to exchange the tep_image_submit call and use the tep_draw_button function: The current call looks like the following: <?php echo tep_image_submit('button_wishlist.gif', 'Add to Wishlist', 'name="wishlist" value="wishlist"'); ?> How do I need to use the tep_draw_button function and what parameters do I need to set for this function, so that both work similar? Thanks in advance for your help and regards Kajoka Link to comment Share on other sites More sharing options...
pdcelec Posted December 16, 2010 Share Posted December 16, 2010 Hello, I am currently working with osCommerce 2.3.1 and try to adapt the wishlist contrib (http://addons.oscommerce.com/info/1682). It works fine so far, but the current tep_image_submit call I am using is not using the button style sheet, which is used in osCommerce 2.3.1. But this style is used with the tep_draw_button call. So my idea is to exchange the tep_image_submit call and use the tep_draw_button function: The current call looks like the following: <?php echo tep_image_submit('button_wishlist.gif', 'Add to Wishlist', 'name="wishlist" value="wishlist"'); ?> How do I need to use the tep_draw_button function and what parameters do I need to set for this function, so that both work similar? Thanks in advance for your help and regards Kajoka Try <?php echo tep_draw_button('Add to Wishlist','plus',tep_href_link(FILENAME_WISHLIST),'primary'); ?> Link to comment Share on other sites More sharing options...
pdcelec Posted December 16, 2010 Share Posted December 16, 2010 Try <?php echo tep_draw_button('Add to Wishlist','plus',tep_href_link(FILENAME_WISHLIST),'primary'); ?> For reference <?php echo tep_draw_button('name on button(can be textor a define IMAGE_BUTTON_XXX),'the icon from the ui stylesheet',tep_href_link(FILENAME_XXX)the link to a file or null,'primary'can be primary ,'' or secondary); ?> Link to comment Share on other sites More sharing options...
kajoka Posted December 16, 2010 Author Share Posted December 16, 2010 Hello pdcelec, unfortunately this is not working, the submit is not triggered properly. Do you have another idea? Otherwise I will try to adapt the view of the link to the appropriate look. Thanks Kajoka Link to comment Share on other sites More sharing options...
pdcelec Posted December 16, 2010 Share Posted December 16, 2010 Hello pdcelec, unfortunately this is not working, the submit is not triggered properly. Do you have another idea? Otherwise I will try to adapt the view of the link to the appropriate look. Thanks Kajoka Try <?php echo tep_draw_button('Add to Wishlist', 'plus', null, 'primary', 'submit'); ?> I will have a go at installing this myself and see if I can come up with anything else Link to comment Share on other sites More sharing options...
pdcelec Posted December 16, 2010 Share Posted December 16, 2010 This addon also uses POST functions so will need the session tokens adding to the forms. Link to comment Share on other sites More sharing options...
kajoka Posted December 18, 2010 Author Share Posted December 18, 2010 This addon also uses POST functions so will need the session tokens adding to the forms. Hello, thanks, I will try it out, if I can integrate it (and post it, if I will have success, otherwise I will ask for help :-) ). Cheers Kai Link to comment Share on other sites More sharing options...
dannybwoy Posted January 3, 2011 Share Posted January 3, 2011 There is an if statement in application_top.php which appears to be looking for the wishlist_x variable to recognise whether something should be redirected to the wishlist. Try this: <?php echo tep_draw_button(IMAGE_BUTTON_ADD_TO_WISHLIST, 'heart', null, null, array ( params=>'name="wishlist_x" action=add_product') ); ?> Link to comment Share on other sites More sharing options...
kajoka Posted January 11, 2011 Author Share Posted January 11, 2011 Hi, thanks that worked :-). Cheers Link to comment Share on other sites More sharing options...
BenjaminJ.Gremillion Posted February 16, 2011 Share Posted February 16, 2011 What about the buttons in the wishlist page itself? As it is they are: echo tep_image_submit('button_delete.gif', 'Delete From Wishlist', 'name="delete_prod" value="delete_prod"') . " " . tep_image_submit('button_in_cart.gif', 'Add to Cart', 'name="add_prod" value="add_prod"'); How would I change to type tep_draw_button and keep the functionality? Link to comment Share on other sites More sharing options...
♥kymation Posted February 16, 2011 Share Posted February 16, 2011 Instructions for converting buttons are here. Regards Jim See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
BenjaminJ.Gremillion Posted February 17, 2011 Share Posted February 17, 2011 Great! Thank you. EDIT: I attempted to convert this: echo tep_image_submit('button_delete.gif', 'Delete From Wishlist', 'name="delete_prod" value="delete_prod"') . " " . tep_image_submit('button_in_cart.gif', 'Add to Cart', 'name="add_prod" value="add_prod"'); to this: echo tep_draw_button('Delete From Wishlist', null, null, 'primary') . " " . tep_draw_button('Add to Cart', null, null, 'primary'); but it doesn't seem to work. I think I'm missing something... Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.