The Official Website of AgoraCart and Agora.cgi
AgoraCart.com Demos Download AgoraCart User Manuals & Wiki Gold Members Forum Go Gold Now! Gold Version Memberships

AgoraCart.com

About
Features
Download
Payment Gateways
Send a Donation
Founders Club
BLOG: News & Updates

Showcases & Demos

AgoraCart Demos
Shop Live Stores

Downloads & Add-ons

Gold Version Downloads
DBwizz Database Mgr.
AgoraCart.com Store

Help & Support

User Manuals
Gold Version Users Forum
Gold Version Chat
Tech Support
Certified Agora Pros
Certified Designers
Hire a Freelancer

Gold Version Members

Member Benefits
Join Today!
Gold Members Home
Gold Version Users Forum
Gold Version Chat Rooms
Gold Version Downloads

For Store Owners

Merchant Accounts
Cool Resources
Advertise Here
"Powered by" Logos
Web Hosting Search

Misc.

Contact Us
MEET's Talking Guide
The Ancient Greek Agora






AgoraCart Free User Forums

This is the official FAQ and Cool Tips guide For the AgoraCart shopping Cart software


Official Sponsors of the AgoraCart Project:

       


RegisterSearchFAQLog in
Reply to topic Page 1 of 1
Link to product from JSP page
Author Message
Reply with quote
Post Link to product from JSP page 
I have a site that worked a year ago under 4.0. I've reactivated the site now under 4.0K-4b and the store no longer works.

I have a JSP page that dynamically builds my product page. The list of products are then linked to the selected product page as follows:

<LI><a href="http://www.<my domain name>/agora/agora.cgi?p_id=<%= productId.get(i) %>"><%= size.get(i) %></a></LI>

I see that with the new version, I need something like this:

<LI><a href="http://www.<my domain name>/agora/agora.cgi?cart_id=&xm=on&p_id=<%= productId.get(i) %>"><%= size.get(i) %></a></LI>

After adding the new statement, the link takes me to the agora default home page (html/index.html), instead of the selected product page. From the default home page, the sample links take me on to my store and everything else seems to be working fine. How do I go directly to the product page and circumvent the Agora sample home page? The sample home page runs some agorascript-pre scripts that get the categories from the DB, but this is not what I want to do.

View user's profile Send private message
Reply with quote
Post  
What is the actual URL to your store?


_________________
God Bless!
Bonnie - AgoraCart Moderator

Get a Gold Membership
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger ICQ Number
Reply with quote
Post  
www.britchesnbows.us

View user's profile Send private message
Reply with quote
Post  
Not the site, the URL to the store..


_________________
God Bless!
Bonnie - AgoraCart Moderator

Get a Gold Membership
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger ICQ Number
Reply with quote
Post  
http://www.britchesnbows.us/agora

View user's profile Send private message
Reply with quote
Post  
So, do you have a page that has your js so we can see what is happening?


_________________
God Bless!
Bonnie - AgoraCart Moderator

Get a Gold Membership
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger ICQ Number
Reply with quote
Post  
The following is the JSP include file that gets included into the product page. This include page displays all items, two items to a row, within a table. This is the code that attempts to access the shopping cart.

<%@ page import="CategoryBean" %>
<%@ page import="java.util.Vector" %>
<%! String productCategory = "";
Vector size = null;
Vector productId = null; %>
<% productCategory = request.getParameter("product"); %>
<jsp:useBean id="category" class="CategoryBean" scope="session" />
<% category.set(productCategory); %>

<% while(category.hasMore()) {
category.getNext(); // Populates bean attributes with next product in this category %>
<tr>
<td valign="top"><%= category.getImage() %>
<B><%= category.getProductName() %></B><BR><BR>
<UL PLAIN>
<LH>Sizes:</LH>
<% size = category.getSizes(); // Return vector of size descriptions (3 - 7 Husky)
productId = category.getProductIds(); // Return vector of style IDs (E-2317)
for(int i=0; i<size.size(); i++) { %>
<LI><a href="http://www.britchesnbows.us/agora/agora.cgi?cart_id=&xm=on&p_id=<%= productId.get(i) %>"><%= size.get(i) %></a></LI>
<% } %>
</UL><BR><BR>
<%= category.getProductDescription() %>
<BR><BR>
</td>
<% if(category.hasMore()) {
category.getNext(); // Populates bean attributes with next product in this category %>
<td valign="top"><%= category.getImage() %>
<B><%= category.getProductName() %></B><BR><BR>
<UL PLAIN>
<LH>Sizes:</LH>
<% size = category.getSizes(); // Return vector of size descriptions (3 - 7 Husky)
productId = category.getProductIds(); // Return vector of style IDs (E-2317)
for(int i=0; i<size.size(); i++) { %>
<LI><a href="http://www.britchesnbows.us/agora/agora.cgi?cart_id=&xm=on&p_id=<%= productId.get(i) %>"><%= size.get(i) %></a></LI>
<% } %>
</UL><BR><BR>
<%= category.getProductDescription() %><BR><BR>
</td>
</tr>
<% } else { %>
<td>&nbsp;</td>
</tr>
<% break; } %>
<% } // end while %>

Sorry to keep sending only pieces of what you need to help me. Not sure what all you needed beyond the line that accesses the shopping cart. I appreciate your assistance and patience. Since this is a JSP include page, there's a fair amount of code to support the page; so rather than confuse, I'm sending what you request.

Again, thanks!

View user's profile Send private message
Reply with quote
Post  
I need to see what the script is actually doing...
So if you could give us a link to a page that utilizes this script, we can see what is actually happening.


_________________
God Bless!
Bonnie - AgoraCart Moderator

Get a Gold Membership
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger ICQ Number
Reply with quote
Post  
This link takes you to the page that then links the store when a size is selected:

http://www.britchesnbows.us/productSummary/summaryPage.jsp?product=elderGirlUniforms

To see what is happening, click on any of the 'sizes' links. For one thing, the cart_id parameter is not initialized. I need to know how to do that in my JSP page. Otherwise, I don't know what else may need to be done to make the link to the store work. I'm thinking this may be all that needs to be done, since this page worked with AgoraCart 4.0.

Thanks.

View user's profile Send private message
Reply with quote
Post  
Why are you using the script??? What is the purpose?

You can use the sizes_opt option file for your sizes, couple that with color drop-downs for each size that should take care of things.


_________________
God Bless!
Bonnie - AgoraCart Moderator

Get a Gold Membership
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger ICQ Number
Reply with quote
Post  
I used JSP because that I understand and the addition of the product link was simple. I don't know how the various html pages inter-relate with the CGI script. The JSP was quicker.

View user's profile Send private message
Reply with quote
Post  
Well... the database would probably be a lot easier to deal with in the long run.
Let AgoraCart dynamically create the pages... The script is already written to do so...


_________________
God Bless!
Bonnie - AgoraCart Moderator

Get a Gold Membership
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger ICQ Number
Reply with quote
Post  
Can you point me to a good tutorial showing how to do this? Everything I've found doesn't exactly apply to what I am doing. I'm sure there's one somewhere, just haven't found it.

View user's profile Send private message
Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum