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
Customizing productsPage.inc
Author Message
Reply with quote
Post Customizing productsPage.inc 
I am tring to customize the productPage.inc to diplay products in a table with every other TR in a different color. I have created my own productPage.inc and I am tring to insert an IF statement to change colors in the TABLE tag. The script I am entering doesn't seem to be running at all. Any suggestions?


_________________
Aaron Hawks
View user's profile Send private message
Reply with quote
Post  
post what your script is and we'll check it out

Reply with quote
Post Sample script 
<!--agorascript-pre
{ #Start of controller code, probably should leave this alone ;-)
local ($myans)="";
if ($rowCount == (1+$minCount)) { #first one
$ags_tot_item=0;
$myans .= '<tr bgcolor='#336699'>'."\n";
}
$ags_tot_item++;

if ((ags_tot_item % 2) == 0){
$myans .= '<tr bgcolor='#FFFFFF'>'."\n";
}else{
$myans .= '<tr bgcolor='#336699'>'."\n";
}
return $myans;
} # end of controller code
-->

<FORM METHOD = "post" ACTION = "%%scriptURL%%">

%%make_hidden_fields%%
<td valign="top" width='50%'><font color="#FFFFFF"><i>%%name%%</i> <br> %%description%% </font></td>

<td width='25%' align='center'><font color="#FFFFFF"> %%price%%</font></td>

<TD VALIGN="MIDDLE" align='center'><INPUT TYPE="TEXT" NAME="%%itemID%%" SIZE="3" MAXLENGTH="3" VALUE="1"></TD>
<TD VALIGN="MIDDLE" align='center'><INPUT TYPE="IMAGE" NAME="add_to_cart_button" VALUE="Add To Cart" SRC="%%URLofImages%%/add_to_cart.gif" BORDER="0"><BR>
<A HREF="agora.cgi?dc=1&%%href_fields%%"><FONT FACE=ARIAL size="2"><B>Check Out</B></FONT></A>
</TD>
</FORM>
</tr>


_________________
Aaron Hawks
View user's profile Send private message
Reply with quote
Post  
your $ags_tot_item is getting reset every time... why not just base each setting tr color off of 1 and 0..... use something like this
Code:

if ($ags_tot_item == 1){
$myans .= '<tr bgcolor='#FFFFFF'>'."\n";
$ags_tot_item = 0;
}else{
$myans .= '<tr bgcolor='#336699'>'."\n";
$ags_tot_item = 1;
}

that should do the trick

Reply with quote
Post  
I have changed the script, and no change. It seems the script isn't running at all. Even a hard coded $ags_tot_item = '<tr bgcolor="#336699">' doesn't seem to work

<!--agorascript-pre
{ #Start of controller code, probably should leave this alone ;-)
local ($myans)="";

if ($ags_tot_item == 1){
$myans .= '<tr bgcolor="#FFFFFF">'."\n";
$ags_tot_item = 0;
}else{
$myans .= '<tr bgcolor="#336699">'."\n";
$ags_tot_item = 1;
}

return $myans;
} # end of controller code
-->

<FORM METHOD = "post" ACTION = "%%scriptURL%%">

%%make_hidden_fields%%
<td valign="top" width='50%'><font color="#FFFFFF"><i>%%name%%</i> <br> %%description%% </font></td>

<td width='25%' align='center'><font color="#FFFFFF"> %%price%%</font></td>

<TD VALIGN="MIDDLE" align='center'><INPUT TYPE="TEXT" NAME="%%itemID%%" SIZE="3" MAXLENGTH="3" VALUE="1"></TD>
<TD VALIGN="MIDDLE" align='center'><INPUT TYPE="IMAGE" NAME="add_to_cart_button" VALUE="Add To Cart" SRC="%%URLofImages%%/add_to_cart.gif" BORDER="0"><BR>
<A HREF="agora.cgi?dc=1&%%href_fields%%"><FONT FACE=ARIAL size="2"><B>Check Out</B></FONT></A>
</TD>
</FORM>
</tr>


_________________
Aaron Hawks
View user's profile Send private message
Reply with quote
Post  
can you provide a link to your site as well as that would help out.....

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