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
Html Template vs. Custom Product Page
Author Message
Reply with quote
Post Html Template vs. Custom Product Page 
I purchased a html template from a website. It included the html source code for the style of my site. I have correctly been able to modify the header and footer to match my html code however what I am attempting to do now is to create a custom product page such as the html code template I have examples a shopping cart set up. (Hope I didn't lose you)

I have basically taken the middle portion of the html code that has the proper look I am attempting and replaced all the html code with the proper script such as

<img src="/images/picture1.jpg">
with
%%image%%

Ok so I think I got it at least I feel like I am on the right track. So I replace all the sections with the proper script. Replacing the image links and the product id and price. However it didn't work. I placed my code in a separate product page named product-page-3a.inc and when I took the normal database HTML and viewed it with my product page it repeated my code over and over. Messing my template up. I know I am missing something vital please help.

This is the example I would like my product page to be like....http://qzay.com/index-1.html

To view my example http://www.qzay.com/shoppingcart/agora.cgi?product=HTML&ppinc=3a

To view my product page http://www.qzay.com/shoppingcart/html/html-templates/productPage-3a.inc

View user's profile Send private message Visit poster's website
Reply with quote
Post  
merry christmas
you will want to use productPage-1a.inc as the outline for your custom ppinc.
where you went wrong is in the table structure. the 1a and other ppinc files begin with the <tr><td> tags and end with the </td></tr> tags. all tables within are opened and closed completely and with regard to nesting. if you vary from this it will throw off the table structure in your header and footer resulting an the entire design either not rendering at all or being blown up as in your case. look at the browser source for this page...
http://www.qzay.com/shoppingcart/agora.cgi?product=HTML&ppinc=3a
i'm sure eveything will be fine until you get to where the ppinc is parsed. there you will see the table errors that are throwing off the layout. these errors will be at the begining and the end of the ppinc section. to help you examine where what gets parsed do this...
at the bottom of your store_header.inc place this comment:
<!--END STORE HEADER-->
at the top of your custom ppinc place this comment:
<!--BEGIN PPINC-->
at the bottom of the ppinc place this comment:
<!--END PPINC-->
and finally at the top of your store_footer.inc place this comment:
<!--BEGIN STORE FOOTER-->

you will see table stuff will be inserted between the header and ppinc and between the ppinc and the footer when viewing your browser source from the rendered page.

so to fix the issue just begin your ppinc with <tr><td> and end it with </td></tr> then make sure all of the nested tables and table tags between are compliant.
dan

Reply with quote
Post  
Merry Christmas to you too!

Ok I think I see what you mean I am in the process of racking my brain with code comparsion instead of wrapping the presents my husband is nagging me about.. I saw that I forgot to add a > on form at the end of it and it cleaned my code up some.

My next question while I figure some other stuff out is this. It looks like my theory might be wrong and help explain if it is or isn't.

The template I have has 3 different types of tables that display the products. One is in a large fashion with a larger picture. The next three to be display are listed on the side in a smaller fashion which the buyer will have to click on to order/add to cart. And at the bottom will be specials that add maybe 3 items together showing a discount possibility. This last one I am not worried about if it don't work I can omit it in the long run and hard code it for specials on the main page.

Now my theory was if I just replaced the html source with the scripts then It would work, however now I am looking at it and it has filled out my code in each of those sections not with different items but with the same item over and over, to what it looks like the "3" that I choose in the manager to display only is repeating the code over and over in the ppinc. So I end up with 3 middle sections formatted with my html with each section displaying one item several times.

Is there a way or code that I could use to identify each area for each new item. I am guessing here but like %%name%% is product one .. then a similar code but to tell the cart to insert another different item. That might fix it. If not I am as we speaking reviewing and comparing 3 sets of code.

(Oh boy I think I am going to need more coffee this morning)!

View user's profile Send private message Visit poster's website
Reply with quote
Post  
here is the contents of the ppinc 1a

<TR>
<TD COLSPAN = "3"><HR></TD>
</TR>
<TR WIDTH="550">
<TD ALIGN="CENTER" WIDTH="160" VALIGN="MIDDLE">
<FONT FACE="ARIAL" SIZE="2">
<FORM METHOD = "post" ACTION = "%%scriptURL%%">
%%make_hidden_fields%%<BR>
%%optionFile%%<BR>
<P>
<!--BEGIN SELECT QUANTITY BUTTON-->
<TABLE>
<TR ALIGN="CENTER">
<TD VALIGN="MIDDLE">%%QtyBox%%</TD>
<TD VALIGN="MIDDLE"><INPUT TYPE="IMAGE"
NAME="add_to_cart_button" VALUE="Add To Cart"
SRC="%%URLofImages%%/add_to_cart.gif" BORDER="0">
</TD>
</TR>
</TABLE>
<!--END SELECT QUANTITY BUTTON-->
</TD>
<TD ALIGN="CENTER" WIDTH="150">%%image%%</TD>
<TD WIDTH="265">
<FONT FACE="ARIAL" SIZE="2">
<b>%%name%%</b><br>
%%description%%<br>
<font color="#FF0000">%%price%%</font><br>
</FONT>
</TD>
</FORM>
</TR>
<TR>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td align="right">
<A HREF="%%scripturl%%?dc=1&%%href_fields%%">
<FONT FACE=ARIAL>Check Out</FONT>
</A>
</TD>
</TR>

first consideration is the table structure. use your tables but start with
<TR>
<TD>
your stuff here...
and end with
</TD>
</TR>

next consideration is the form. add this near the top before any tokens or script as you see above...
<FORM METHOD = "post" ACTION = "%%scriptURL%%">
%%make_hidden_fields%%

then near the bottom you need to close the form as senn in the above...
</form>

now replace the product image tag with %%image%% and the add to cart imge that came with your template with...
<!--BEGIN SELECT QUANTITY BUTTON-->
<TABLE>
<TR ALIGN="CENTER">
<TD VALIGN="MIDDLE">%%QtyBox%%</TD>
<TD VALIGN="MIDDLE"><INPUT TYPE="IMAGE"
NAME="add_to_cart_button" VALUE="Add To Cart"
SRC="%%URLofImages%%/add_to_cart.gif" BORDER="0">
</TD>
</TR>
</TABLE>
<!--END SELECT QUANTITY BUTTON-->
this is a complete table so make sure you nest it properly.

save thiose changes and test. you can expand from there with script and tokens but make sure these minimal elements work properly.
dan

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