Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

how to manually create product url with option


dje42

Recommended Posts

Posted

Hello,

I need help.

I've created a page with a section that will give buyers a chance to add to there initial purchase, and buy (add to the cart) other products, without leaving the page.

This is just html and not involving php/database other than manually adding the " buy_now" link to a product picture.

..../?action=buy_now&products_id=34

This works fine , adds to the cart doesn't leave the initial page.

The problem occurs when a product has options, the link then just goes to that other product page.

How do you create an url that will also include a certain option.

Here's a product (34) url with an option, this is taken from the "Cart Contents" page with the product sitting in the cart.

.../?action=buy_now&products_id=34{6}16

I've tried this but the link still just goes to the products page, nothing is added to the cart.

Does anyone know how to write this url so it will just add to the cart?

 

Thanks!

Posted

Haveing static html pages on your site is a very bad idea as customers visiting those pages may loose their session so cart/login etc http://www.oscommerce.com/forums/index.php?showtopic=330479&hl

 

Your links should all use tep_href_link for the same reason.

 

When a product has attributes the app will divert all 'buy_now' to the product page for completion.

 

That page uses the post method to pass the params, so you can't use a url query string to duplicate, you must create a form. wink.gif

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Posted

Thanks Sam,

 

I really didn't mean an html page, I just meant that section of the page was not pulling the image from the database, I need control over what product images are there.

 

How about looking at the other way, how do I create a section on an existing STS product_info.php page, that has a product image (put there manually), an options button maybe two, and a buy button.

 

Is that possible, I'm not a programmer so I would need an example if possible...

 

Thanks...

Archived

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

×
×
  • Create New...