Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Adding products to cart from another site.


bold

Recommended Posts

Posted

Can I display images on another site with an order button that will take the user to the shop site with the product being placed in the cart?

 

If so can the products be generated at random and displayed with the price, on a different site? Can this be done on a different server?

 

Thanks for any help.

Posted

there is an affiliate solution coming up... if that is what you're looking for.

You can do what you want but you'll have to have the other site link to a script on your server... that script gets the random image with button etc (like the new products box does)...

"Politics is the art of preventing people from taking part in affairs which properly concern them"

Posted

Thanks that looks great. I would also like to be able to have items for sale that can be linked to my cart. The affiliate solution looks like it is just a banner link to the shop site. What would the code be to just add a product to the cart? It does not have to be (but would be nice) if it was part of the affiliate package.

 

Thanks

Posted

A quick (but static) solution will be to partially copy the html source output from product_info.php to the remote site with FULL paths......

// I have search engine friendly urls on, your's might look different

<img src="http://www.yoursite.com/catalog/images/3255.jpg">

<form name="cart_quantity" method="post" action="http://www.yoursite.com/catalog/product_info.php/cPath/1_487/products_id/3255/action/add_product">

   <input type="hidden" name="products_id" value="3255">

   <input type="image" src="http://www.yoursite.com/catalog/includes/languages/english/images/buttons/button_in_cart.gif" border="0" alt="In Cart">

</form>

 

If you want this dynamic you'll have to do it on YOUR site and feed the remote site... so they would do

 

<?php

include('http://www.yoursite.com/your_random_product_displayer.php');

?>

 

HTH

Mattice

"Politics is the art of preventing people from taking part in affairs which properly concern them"

Posted

Thanks mattice ... you just broke my security ... :shock:

 

I used this code on a different server:

 

<img src="http://www.thewebmakerscorner.com/snapmods_new/images/no_picture.gif">

<form name="cart_quantity" method="post" action="http://www.thewebmakerscorner.com/snapmods_new/product_info.php?action=add_product">

   <input type="hidden" name="products_id" value="12">

   <input type="hidden" name="cart_quantity" value="1">

   <input type="image" src="http://www.thewebmakerscorner.com/snapmods_new/includes/languages/english/images/buttons/button_in_cart.gif" border="0" alt="In Cart">

</form>

 

It added the product to the cart ... no sweat.

 

Problem is, I have it setup for no selling when not logged in. Obviously I did not think about URL modifications and manipulations when I wrote that. :oha:

 

Where is that white out when you need it ... :roll:

Archived

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

×
×
  • Create New...