Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

help with add to cart feature, please


Guest

Recommended Posts

Hi everyone, I am trying to setup a buynow with quantity box in my featured products on front page, but I cannot get it to add the product, I have missed something but i have been, rd and rd and rd and I cannot see the problem, so any help on this bit of code would be appreciated.

 

Site for in action buy now button front page of My Webpage

 

<form name="cart_quantity" method="post" action="' . tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product', 'NONSSL'). '">
       <div align="right">
         <input type="hidden" name="products_id" value="' . $featured_products['products_id'] . '">
         <input type="text" name="quantity" value="1" maxlength="5" size="5">
         <br>
         ' . tep_image_submit('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW . $featured_products['products_name']). '
         </div>
   </form>

 

Thx in advance.

Link to comment
Share on other sites

what do you have in application_top add_product section ?

 

Have you made sure that your parameters are named as expected by the add_product section ?

Can you paste that part of the code too ?

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Link to comment
Share on other sites

what do you have in application_top add_product section ?

 

Have you made sure that your parameters are named as expected by the add_product section ?

Can you paste that part of the code too ?

 

Haha j0ker fixes it again, I have cracked it thx, for the response though, I was missing a few bits in the above code and after a clear head, I am sorted thx. :thumbsup:

 

Just need to clean code up a little with all the messing things got untidy in there, then add code to other parts I have on front like specials and new products.

 

Many thx for the reply.

 

Regards

j0ker :D

 

Ohhh almost forgot here is what I did, just incase I have done soemthing wrong or someone else wants:

 

<div align="right"><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $featured_products['products_id']) . '">' . tep_image_button('button_buy_now.gif', TEXT_BUY . $featured_products['products_name'] . TEXT_NOW) . '</a> ' . '<br></div></td>

 

Tata for now.. ;)

Link to comment
Share on other sites

Actually after cleaning house here is the add to cart feature for featured products on front page:

 

<div align="right"><a href="' . tep_href_link(FILENAME_DEFAULT, tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $featured_products['products_id'], 'NONSSL') . '">' . tep_image_button('button_buy_now.gif', TEXT_BUY . $featured_products['products_name'] . TEXT_NOW) . '</a></div>

 

This now works 100% thx guys for any help. :lol:

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...