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
A Problem I Can't Figure Out
Author Message
Reply with quote
Post A Problem I Can't Figure Out 
I customizing my inc files, I have removed all of the table and table related so I can start from scratch using divs.
After removing them everything still works except the add to cart function. For whatever reason, the only way it will work is if that "form" inside a <td> tag. How can I get this to work without this tag?
Here is my 3 inc files. It is not complete as I am trying to get past this hurdle first.
Header:
Code:
 
<div id="menu">



   <div id="menutop"><a title="home"href="index.html"><img alt="home" src="menu-top.gif" width="200" height="200" /></a></div>

   

   <div class="navcontainer">

      <ul class="navlist">

         <li><a title="Home" href="../index.html">home</a></li>

         <li><a title="Boys Blankets" href="http://www.blanketsnsuch.com/store/agora.cgi?page=store.html">Boys Blankets</a></li>

         <li><a title="link three" href="index.html">link three</a></li>

         <li><a title="link four" href="index.html">link four</a></li>

         <li><a title="link five" href="index.html">link five</a></li>

         <li><a title="link six" href="index.html">link six</a></li>

      </ul>

   </div>

   

   <br />

   

   

</div>



<div id="main">
<!--BEGIN HEADER TABLE-->

<font face="Verdana, Arial" size=+1 color="#ccc"><b>Powered by AgoraCart - AgoraCart.com
</b><br></font><font face="Verdana, Arial" size=2 color="white"><i>Thanks for Visiting our Store!</i></font>


<!--agorascript-pre {
local (@my_cart_fields,$my_cart_row_number,$result);
local ($count,$price,$product_id,$quantity,$total_cost,$total_qty)=0;
if ((!(-f "$sc_cart_path"))||($sc_processing_order =~ /yes/i)) {return ""}
open (CART, "$sc_cart_path") || &file_open_error("$sc_cart_path",
 "display_cart_contents_in_header", __FILE__, __LINE__);
 while (<CART>)
  {
   $count++;
   chop;   
   @my_cart_fields = split (/\|/, $_);
   $my_cart_row_number = pop(@my_cart_fields);
   push (@my_cart_fields, $my_cart_row_number);
   $quantity = $my_cart_fields[0];
   $product_id = $my_cart_fields[1];
   $price = $my_cart_fields[$sc_cart_index_of_price_after_options];
   $total_cost = $total_cost + $quantity * $price;
   $total_qty = $total_qty + $quantity;
  } # End of while (<CART>)
close (CART);
if ($count > 0) {
  $result = '<div align="center">' .
      '' .
      '&nbsp;&nbsp;' .
      '<a href="agora.cgi?dc=1&%%href_fields%%' .
      '"><font color="#0000ff">View Cart</font></a>' .
     '<div style="width:50%;text-align:center;font-size:.75em;">' .
     "Items in shopping cart: $total_qty &nbsp;\n&nbsp; " .
      "Item cost subtotal:&nbsp; " . &display_price($total_cost) .
      "</font></div>\n" .
      '' .
      '<a href="%%StepOneURL%%?order_form_button.x=1&%%href_fields%%' .
      '"><font color="#0000ff">Check Out</font></a>&nbsp;&nbsp;' .
      "</div>";
 } else {
  $result = "";
 }
 return $result;
}-->

<!--END HEADER TABLE-->


Product:
Code:

<!--agorascript-pre
{ #Start of controller code, probably should leave this alone ;-)
local ($myans)="";
if ($rowCount == (1+$minCount)) { #first one
  $ags_row_item=0;
  $ags_tot_item=0;
  $myans .= ''."\n";
 }
$ags_row_item++;
$ags_tot_item++;
if (($rowCount == ($maxCount)) || ($rowCount == ($num_returned)))
 { # very last one, need to join these two cells, no border
  if ($ags_row_item == 1) { # first and only one
    $myans .= ''."\n";
    $myans .= ''."\n";
   }
 }
if ($ags_row_item == 2) { # second one
  $ags_row_item=0; #reset counter
  $myans .= ''."\n";
 } else { #first one
  $myans .= ''."\n";
 }
return $myans;
} # end of controller code
-->


<FORM METHOD = "post" ACTION = "%%scriptURL%%">
<div style="text-align:center;font-weight:bold">%%name%%
<div style="border:1px solid #fff;">%%image%%</div></div>

<br>
%%description%%
%%make_hidden_fields%%
<BR>
%%optionFile%%
<BR>
<P>
<!--BEGIN SELECT QUANTITY BUTTON-->
%%QtyBox%%
<INPUT TYPE="IMAGE"
 NAME="add_to_cart_button" VALUE="Add To Cart"
 SRC="%%URLofImages%%/add_to_cart.gif" BORDER="0">

<!--END SELECT QUANTITY BUTTON-->

<!--agorascript-pre
{ # more controller code
local ($myans)="";
if (($rowCount == ($maxCount)) || ($rowCount == ($num_returned)))
 { # very last one
  if ($ags_row_item == 1) { # first and only one
    $myans .= ''."\n";
    $myans .= ''."\n";
   }
 }
return $myans;
} # end controller code
-->






<FONT FACE="ARIAL" SIZE="2" color="#FF0000">%%price%%</font>


<A HREF="%%scripturl%%?dc=1&%%href_fields%%"><FONT FACE=ARIAL>View Cart</FONT>
</A>


<A HREF='%%StepOneURL%%?order_form_button.x=1&%%href_fields%%'><FONT
FACE=ARIAL>Check Out</FONT>
</A>
</FORM>
<!--agorascript-pre
{ # more controller code
local ($myans)="";
if ($ags_row_item == 1) { # first one
  $myans .= ''."\n";
 } else { # second one
  $myans .= ''."\n";
 }
if (($rowCount == ($maxCount)) || ($rowCount == ($num_returned)))
 { # very last one, need to join these two cells, no border
  if ($ags_row_item == 1) { # first and only one
    $myans .= ''."\n";
   }
 }
if (($rowCount == ($maxCount)) || ($rowCount == ($num_returned)))
 { # very last one
#  if ($ags_row_item == 1) { # finished first one, add a blank dummy
#second
#    $myans .= ''."\n";
#   }
  $myans .= ''."\n";
 }
return $myans;
} # end controller code
-->


Footer:
Code:



<CENTER>
<!--agorascript-pre
&capture_STDOUT;
&cartlinks;
  print "<font face=\"Arial\" size=\"2\">";
# take make links underlined
# $cartlinks =~ s/style=\"text-decoration: none\"//ig;
# to layout horizontally with 3 spaces
# $cartlinks =~ s/<br>/&nbsp;&nbsp;&nbsp;/ig;
# to layout horizontally with | dividers spaces
$cartlinks =~ s/<br>/&nbsp;&nbsp;|&nbsp;&nbsp;/ig;
print $cartlinks;
  print "</font>";
&uncapture_STDOUT;  --></CENTER>
<CENTER>
<CENTER><BR>
<small>Copyright 1999-2003 K-Factor Technologies Inc. at <a href="http://www.agoracart.com">AgoraCart.com</a></small></CENTER></CENTER>
</div>


Thanks for looking.

-SNT

View user's profile Send private message Send e-mail
Reply with quote
Post  
The script automatically starts the table structure on the product pages and when your product page doesn't have that, it will mess things up.
You will need to use table structure for at least the product area of the store.

HTH!


_________________
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  
Ok, thanks.

View user's profile Send private message Send e-mail
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