Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Code for Add to Cart button in Header


britchops

Recommended Posts

I would like to know what code to use to add another Add to Cart button into the header.

 

So far I have guessed with the code from the product_info page and the other header tags:

 

echo tep_draw_button(IMAGE_BUTTON_IN_CART, 'cart', 'null', 'primary', tep_href_link (FILENAME_SHOPPING_CART, '', 'SSL'));

 

This gets me a correct Add to Cart button, but doesn't take me to a 'full' cart in shopping cart (I only have the one product/course download to 'fill' the cart).

 

Any thoughts from the code guys?

 

Cheers

 

TJ @britchops

 

PS I removed the checkout button successfully from header and shopping_cart.php and left just PayPal button. Hence this request.

Link to comment
Share on other sites

The add to cart button need to add something to the cart, a product, so it doesn't make a big sense to have it in the header?

 

Should it appear on each page even if no product present? What is it supposed to do on the contact us page?

What should it add to the cart in case of a product listing?

 

In case of product info, like the code you found, the "add to cart" is the submit button of the product info form and need to be within this form

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...