X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Load shop in external site (https://forum.x-cart.com/showthread.php?t=42014)

Warwick 08-27-2008 07:10 AM

Load shop in external site
 
Is there some mod out there which can do the following:

Imagine you have site A en the X-Cart shop is on site B;
goal is to sell products on site A without leaving site A; so basically the complete add to cart and checkout steps will have to be loaded from site B (where the X-Cart shop is) into a main content section of site A.

The products on site A do not have to be loaded from site B, they will only have the 'add to cart' link for that specific product; after clicking it, the cart and checkout procedure will be loaded from site B.

Does this make sense?

Piotr M. 08-27-2008 11:29 AM

Re: Load shop in external site
 
i think that is pissible.
You need to modify skin to remove header, footer, menus and add "add to cart" links or buttons. After that you can load x-cart into frame or iframe at site A.

Warwick 08-28-2008 12:01 AM

Re: Load shop in external site
 
Thnaks for the suggestion, you really think that's the only way? Nobody run into a solution (read mod) that could do something like that?

Piotr M. 08-28-2008 01:18 AM

Re: Load shop in external site
 
There is also a way simply insert add to cart link into product description or modify templates.

Then customer would go between two sites after adding product to cart.

Warwick 08-28-2008 04:43 AM

Re: Load shop in external site
 
Quote:

Originally Posted by Piotr M.
Then customer would go between two sites after adding product to cart.


That's exactly what I am trying to avoid :)

Piotr M. 08-28-2008 11:48 PM

Re: Load shop in external site
 
Then maybe using x-cart shopping cart, and whe customer press checkout, go to site B with whole cart transfered via GET or POST request?

If so, you need to place a form with hidden fields at the cart page, and fill it with product ids, amount and options if any. And whe customer press checkout button, it just submits the form.

Warwick 08-29-2008 12:11 AM

Re: Load shop in external site
 
Sounds plausibel but rather difficult, I was kind of hoping there was another (easier way) :-(

Piotr M. 08-29-2008 03:10 AM

Re: Load shop in external site
 
It's not difficult, I think.
HTML Code:


<form action="http://site-b.com/checkout.php" method="POST">
{foreach from=$cart.products item=p}
<input type="hidden" name="products[{$p.productid}]" value="{$p.amount}" />
{/foreach}
<input type="submit" value="Checkout" />
</form>


And at site B you get $products = $_POST['products'];
$products array where ey is product id, and value is amount.

If you have options, it vould be a bit more complicated, but also possible.


All times are GMT -8. The time now is 07:09 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.