Not sure what to use for this

  • Thread starter Marshall Dudley
  • Start date
M

Marshall Dudley

I have a requirement where I need to insert a cart contents into all the
pages of a website. There are two websites involved, the main website
of the store owner, and the website of the shopping cart service. I
need to be able to display the cart contents of the cart that is on the
service, on pages that are thrown by the main site.

When an item is added to the cart a post is made from the main site to
the service site, then after the service site adds the item to the cart,
the customer is returned back to the main site. I need the cart
contents to appear in a cell or applet on the main site.

I have looked at the following, but seem to be constrained on each of
them.

Method
Use cookies with javascript.
Problem
Cookies can be placed on the client's system by the cart system, but the
javascript will be in a document on the main site and thus they cannot
be read.

Method
Use javascript
Problem
I can't find any way to get javascript to access a webpage and put it's
contents into the cell of a table in the main document, or access a
website and acquire data which it puts into fields of the main
document. If this can be done, I would appreciate it if someone could
point me in the right direction.

Method
Use a Java Applet
I am completely unfamiliar with this. But from reading it appears I can
access information, but it cannot be from a different website than the
one the present page is on for security reasons. If so I can't use it
either. Also if it can access a page on another site, or information
from another site, would it provide the appropriate cookies to the
service site so they can identify the correct customer/cart?

Thanks,

Marshall
 
G

Giorgos Maravelias

Marshall said:
I have a requirement where I need to insert a cart contents into all the
pages of a website. There are two websites involved, the main website
of the store owner, and the website of the shopping cart service. I
need to be able to display the cart contents of the cart that is on the
service, on pages that are thrown by the main site.

When an item is added to the cart a post is made from the main site to
the service site, then after the service site adds the item to the cart,
the customer is returned back to the main site. I need the cart
contents to appear in a cell or applet on the main site.

I have looked at the following, but seem to be constrained on each of
them.

Method
Use cookies with javascript.
Problem
Cookies can be placed on the client's system by the cart system, but the
javascript will be in a document on the main site and thus they cannot
be read.

Method
Use javascript
Problem
I can't find any way to get javascript to access a webpage and put it's
contents into the cell of a table in the main document, or access a
website and acquire data which it puts into fields of the main
document. If this can be done, I would appreciate it if someone could
point me in the right direction.

Method
Use a Java Applet
I am completely unfamiliar with this. But from reading it appears I can
access information, but it cannot be from a different website than the
one the present page is on for security reasons. If so I can't use it
either. Also if it can access a page on another site, or information
from another site, would it provide the appropriate cookies to the
service site so they can identify the correct customer/cart?

Thanks,

Marshall
what is the technologies that use the two sites ?

Georgios Maravelias
 
G

Guest

As I understand it you are dealing with 2 sites: the shopping site, and
the cart site. And you want to do this:

shopping -> cart -> shopping

And you want to display the cart contents on the second instance of the
shopping site.

If I've got that much right - I think you'll need to post whatever data
you need back to the shopping site. There isn't a good method of
passing data between sites using only client side code. And I don't
see how an applet is going to help either.

On the cart site, can you store the data in some hidden fields, do
whatever processing you do, then post the data back to the shopping
site?
 
M

Marshall Dudley

Giorgos said:
what is the technologies that use the two sites ?

Georgios Maravelias

The shopping cart server, Free BSD, Apache and Perl.
The main store site, can be anything, but most are running either a Unix
flavor with Apache, or a Windows server with whatever they run. I have no
control over them. I do not want to try to walk clients through getting server
side includes turned on, expecially since many hosting companies do not even
allow them.

Thanks,

Marshall
 
M

Marshall Dudley

As I understand it you are dealing with 2 sites: the shopping site, and
the cart site. And you want to do this:

shopping -> cart -> shopping

Yes, it goes to the cart just long enough for the cart site to record the
addition to the cart, then it does a meta refersh back to the original
site. Of course when they go to checkout, it stays in the cart until the
purchase is completed, but that is irrelevent to this issue.
And you want to display the cart contents on the second instance of the
shopping site.
Correct.



If I've got that much right - I think you'll need to post whatever data
you need back to the shopping site. There isn't a good method of
passing data between sites using only client side code. And I don't
see how an applet is going to help either.

Since their sites are going to plain html code in the document directory,
instead of cgi code, it is not possible to post back to it.
On the cart site, can you store the data in some hidden fields, do
whatever processing you do, then post the data back to the shopping
site?

Yes, the shopping cart side is fully functional. The problem is that some
of my clients want to have a small cart contents box show on their main
site after an item has been put into their cart, and I cannot figure out a
way to get the cart information to display on a static html page on their
site. The shopping cart site can be easily made to send whatever data, or
page it needs to, it is strictly the customer's main site that I have no
clue as to how to do it, or even if it can be done.

Thanks,

Marshall
 
A

Anton Spaans

Marshall Dudley said:
(e-mail address removed) wrote:


Yes, the shopping cart side is fully functional. The problem is that some
of my clients want to have a small cart contents box show on their main
site after an item has been put into their cart, and I cannot figure out a
way to get the cart information to display on a static html page on their
site. The shopping cart site can be easily made to send whatever data, or
page it needs to, it is strictly the customer's main site that I have no
clue as to how to do it, or even if it can be done.

Thanks,

Marshall

Make use of an <iframe>. Add an <IFRAME> element to the static page (page on
customer's main site). Set the iframe's source (src attribute) to a page of
your shopping-cart application. This page will just show a miminal
shopping-cart. Then you can still use cookies, etc, because the <iframe> is
within your domain, cookies are sent and received ok. Make sure, however,
that the users of the customer's main site are allowed to have embedded
documents (<iframe> elements) that cross domains (security settings of
browser).

Good luck
-- Anton.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top