Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Exchange tep_image_submit call to use tep_draw_button function


kajoka

Recommended Posts

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

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

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

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

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

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

  • 3 weeks later...

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

  • 1 month later...

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...