Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Adding items into cart from outside the software


casaic

Recommended Posts

Hello,

I am working on a project where customers log on to a website and design business cards. They enter their info and proof their card, pretty cut and dry stuff. Here is where my dilema comes into place.

 

Once they design their card and place the order, I was wondering if there was a way to immediately send them into the osCommerce cart for payment based on their order. My original idea is to set up the products based on the design and quantity, having a separate product in the cart for each, but sending them directly to their shopping cart with the item added is where I am stuck.

 

I know a lot of people here have done some pretty amazing and impressive things with osCommerce, so I am almost certain that my idea is something that can be made real. I am just not real sure where to start. I want to skip the whole "add to cart" step if at all possible and go directly to the cart from the previous page.

 

If anyone has some insight they can share with me it would be greatly appreciated. Thanks!

Link to comment
Share on other sites

Sorry for the new post, no edit option available.

 

I have tried a couple of things here. The first thing I tried was recreating the form from the product_info.php. Below is what I added to the HTML page:

 

<form name="cart_quantity" action="http://www.mywebsite.com/catalog/product_info.php?products_id=##&action=add_product&osCsid=#####" method="post">
<input type="hidden" name="osCid" value="#####" />
<input type="hidden" name"products_id" value="##" /><input type="image" src="card_img/image.jpg" alt="Add to Cart" title=" Add to Cart " />
</form>

 

This works, but not really. It goes directly to the cart, but the cart is always displayed as empty.

 

The second thing I tried is adding a buy now link, as follows:

 

<a href="http://www.mywebsite.com/catalog/index.php?action=buy_now&products_id=##">Buy Now </a>

 

What this does is takes me to the product page, where I still have that step of adding to the cart.

 

I alsi tried the contribution offsite link into shopping cart, however this does the exact same thing as making a buy now link.

 

It seems to me I have seen this done before, however did not have a use for it at the time so didn't pay much attention to it. Shame on me. Anyone who has some insight, suggestions, or knows what they are doing I would sure appreciate help. I know a lot of these posts get lost forever, so thanks for taking the time to read this one.

Link to comment
Share on other sites

you have to change the php page to use the tep_href_link function (instead of hard-coded links) because it adds the session necessary to differentiate visitors' carts.

Link to comment
Share on other sites

you have to change the php page to use the tep_href_link function (instead of hard-coded links) because it adds the session necessary to differentiate visitors' carts.

 

How will that work if this link is from outside OSC or even from another domain?

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...