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
Only want one product to display in main store page.
Author Message
Reply with quote
Post Only want one product to display in main store page. 
I was able to find in the forum weeks ago how to control the umber of products shown by editing an array I believe. I can't again find it again to eliminate another product. Currently there are the words (In:) and (Only?) but no product image. Obviously this doesn't look good. For now I only want the one product. It can be seen in this link.
http://www.hhogassavermpg.com/store52/agora.cgi

View user's profile Send private message
Reply with quote
Post  
Hi,

Is it one particular product, or is it one random product you need to display.

Regards.
Glen.


_________________
glen.m.darby@virgin.net
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
Reply with quote
Post  
One particular product.

I'd like to find that file I edited so that in th future more products are added I make the necessary adjustment.

If I can find it I will document where it is this time.

View user's profile Send private message
Reply with quote
Post  
If its just the file you need, you will find it in the directory >>

agoracart52/html/index.html

it holds the code for a random selection of products but it looks like you have changed it as you said.

If you need help with the code, get back to me....

Regards.
Glen.


_________________
glen.m.darby@virgin.net
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
Reply with quote
Post  
So I did have the correct file.

I had the second array edited out as you've seen, why does it still show up on the page?

$array1 = $line[0];
# $array2 = $line[1];
# $array3 = $line[int rand(@line)];
# $array4 = $line[int rand(@line)];

View user's profile Send private message
Reply with quote
Post  
Hi,
You have the arrays commented out, but you still have the html in the code >>

Code:
<table class="template_mainbackground" width="96%" align="center" border="0" cellpadding="0" cellspacing="1">
          <tbody><tr>
            <td class="template_mainbackground"><span class="style6"><span class="style7"><center>See What's inside our Store:</center></span></span></td>
          </tr>

  <tr>
   <td>
<table width="100%" align="center" bgcolor="#ffffff" border="0" cellpadding="3">
  <tbody><tr>
   <td valign="top" width="25%"><center><font size="2" face="arial">In HHO Gas Saver:<br><br></font>
    <a href="agora.cgi?cart_id=7170480.13389&amp;p_id=00002&amp;xm=on">
   <img class="template_image_no_border" src="html/images/temp-image2.gif" alt="temp-image2.gif"></a></center></td>

   <td valign="top" width="25%"><center><font size="2" face="arial">In :<br><br></font>

    <a href="agora.cgi?cart_id=7170480.13389&amp;p_id=&amp;xm=on">
   <img class="template_image_no_border" src="html/images/" alt=""></a></center></td>

   </tr><tr>

   <td valign="top" width="50%"><center><font size="2" face="arial">
   <a href="agora.cgi?p_id=00002&amp;xm=on">Component List to Build HHO Gas Saver</a></font></center></td>

   <td valign="top" width="50%"><center><font size="2" face="arial">
   <a href="agora.cgi?p_id=&amp;xm=on"></a></font></center></td>

   <td valign="top" width="25%"><center><font size="2" face="arial">
   <a href="agora.cgi?p_id=&amp;xm=on"></a></font></center></td>

   <td valign="top" width="25%"><center><font size="2" face="arial">
   <a href="agora.cgi?p_id=&amp;xm=on"></a></font></center></td>   
      
      </tr><tr>

   <td valign="top" width="50%"><center><font size="2" face="arial">
      <b><font color="#ff0000">Only $ 40.00</font></b></font></center></td>

   <td valign="top" width="50%"><center><font size="2" face="arial">
      <b><font color="#ff0000">Only $ </font></b></font></center></td>

   </tr>
</tbody></table></td>
   </tr>
</tbody></table>


and some of that is printing out the "Only $" and the "In :"

Hope that helps.
Regards.
Glen.


_________________
glen.m.darby@virgin.net
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
Reply with quote
Post  
You can try putting in the following if you want >>

Code:
<table class="template_mainbackground" width="96%" align="center" border="0" cellpadding="0" cellspacing="1">
          <tr>
            <td  class="template_mainbackground"><span class="style6"><span class="style7">See What's inside our Store:</span></span></td>
          </tr>
  <tr>
   <td>
<table width="100%" border="0" align="center" cellpadding="3" bgcolor="#FFFFFF">
  <tr>
   <td valign=top><center><font face=arial size="2">In $special1[1]:<br><br></font>
    <a href="agora.cgi?cart_id=&amp;p_id=$special1[0]&amp;xm=on">
   <img class="template_image_no_border" src="%%URLofImages%%/$image1" alt="$image1"></a></center>     <center>
     <font face=arial size="2"><br>
     <br>
     </font>
       </center>   </td>
   </tr><tr>

   <td valign=top><center><font face=arial size="2">
   <a href="agora.cgi?p_id=$special1[0]&amp;xm=on">$special1[3]</a></font></center>     <center>
   </center>   </td>

   </tr><tr>

   <td valign=top><center><font face=arial size="2">
      <b><font color="FF0000">Only $sc_money_symbol $special1[2]</font></b></font></center>     <center>
         </center>      <center>
        </center>         <center>
                </center></td>

   </tr>
</table></td>
   </tr>
</table>

But when you add another product at a later date you will need to alter this html also....

Regards.
Glen.


_________________
glen.m.darby@virgin.net
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
Reply with quote
Post  
Those are pages generated by AgoraCart. How I am supposed to know where and what page that code is in? The only code I've added to the pages is the header and footer and the code you sent me isn't in the header and footer fields. Doesn't AgorCart keep up with the code changes?

Is there documentation on page names where they are so it's not such a shot in the dark?

Why if the header and footer fields don't contain this code is it in the pages?

What page is it that needs edited?

That seems like a cart malfunction or am I wrong.

View user's profile Send private message
Reply with quote
Post  
Put it where?

View user's profile Send private message
Reply with quote
Post  
Hi,

It is coded in the "agoracart52/html/index.html" page itself.......

Code:
<!--agorascript-pre
# this is an AgoraCart members only AgoraScript Snippet.  You must be a current member at:
# http://www.AgoraCartPro.com .  Sign up or renew at AgoraCart.com
# Copyright &copy; 2000 - Present by K-Factor Technologies Inc., AgoraScript, and BytePipe.
&capture_STDOUT; open (DATAFILE, "<./data_files/data.file") || die print "Could not open data.file";  @line=<DATAFILE>;
 close (DATAFILE);
 srand;
 $array1 = $line[int rand(@line)];
 $array2 = $line[int rand(@line)];
 $array3 = $line[int rand(@line)];
 $array4 = $line[int rand(@line)];
 @special1 = split (/\|/, $array1);
 @special2 = split (/\|/, $array2);
 @special3 = split (/\|/, $array3);
 @special4 = split (/\|/, $array4);
 $image1 = $special1[7];
 $image2 = $special2[7];
 $image3 = $special3[7];
 $image4 = $special4[7];
   $image1 =~ s/%%IMG%%//ig;
   $image2 =~ s/%%IMG%%//ig;
   $image3 =~ s/%%IMG%%//ig;
   $image4 =~ s/%%IMG%%//ig;

print qq~
<!--this is an AgoraCart members only AgoraScript Snippet.  You must be a current member at:
 http://www.AgoraCartPro.com .  Sign up or renew at AgoraCart.com
 Copyright &copy; 2000 - Present by K-Factor Technologies Inc., AgoraScript, and BytePipe.--\>


<table width="96%" border="0" align="center" cellpadding="0" cellspacing="1" class="template_mainbackground">
          <tr>
            <td  class="template_mainbackground"><span class="style6"><span class="style7">See What's inside our Store:</span></span></td>
          </tr>
  <tr>
   <td>
<table width="100%" border="0" align="center" cellpadding="3" bgcolor="#FFFFFF">
  <tr>
   <td valign=top width="25%"><center><font face=arial size="2">In $special1[1]:<br><br></font>
    <a href="agora.cgi?cart_id=&amp;p_id=$special1[0]&amp;xm=on">
   <img class="template_image_no_border" src="%%URLofImages%%/$image1" alt="$image1"></a></center></td>

   <td valign=top width="25%"><center><font face=arial size="2">In $special2[1]:<br><br></font>
    <a href="agora.cgi?cart_id=&amp;p_id=$special2[0]&amp;xm=on">
   <img class="template_image_no_border"  src="%%URLofImages%%/$image2" alt="$image2"></a></center></td>

   <td valign=top width="25%"><center><font face=arial size="2">In $special3[1]:<br><br></font>
    <a href="agora.cgi?cart_id=&amp;p_id=$special3[0]&amp;xm=on">
   <img class="template_image_no_border" src="%%URLofImages%%/$image3" alt="$image3"></a></center></td>

   <td valign=top width="25%"><center><font face=arial size="2">In $special4[1]:<br><br></font>
    <a href="agora.cgi?cart_id=&amp;p_id=$special4[0]&amp;xm=on">
   <img class="template_image_no_border" src="%%URLofImages%%/$image4" alt="$image4"></a></center></td>

   </tr><tr>

   <td valign=top width="25%"><center><font face=arial size="2">
   <a href="agora.cgi?p_id=$special1[0]&amp;xm=on">$special1[3]</a></font></center></td>

   <td valign=top width="25%"><center><font face=arial size="2">
   <a href="agora.cgi?p_id=$special2[0]&amp;xm=on">$special2[3]</a></font></center></td>

   <td valign=top width="25%"><center><font face=arial size="2">
   <a href="agora.cgi?p_id=$special3[0]&amp;xm=on">$special3[3]</a></font></center></td>

   <td valign=top width="25%"><center><font face=arial size="2">
   <a href="agora.cgi?p_id=$special4[0]&amp;xm=on">$special4[3]</a></font></center></td>

   </tr><tr>

   <td valign=top width="25%"><center><font face=arial size="2">
      <b><font color="FF0000">Only $sc_money_symbol $special1[2]<\/font></b></font></center></td>

   <td valign=top width="25%"><center><font face=arial size="2">
      <b><font color="FF0000">Only $sc_money_symbol $special2[2]</font></b></font></center></td>

   <td valign=top width="25%"><center><font face=arial size="2">
      <b><font color=\"FF0000\">Only $sc_money_symbol $special3[2]<\/font><\/b><\/font></center><\/td>

   <td valign=top width="25%"><center><font face=arial size="2">
      <b><font color="FF0000">Only $sc_money_symbol $special4[2]</font></b></font></center></td>

   </tr>
</table></td>
   </tr>
</table>
~; &uncapture_STDOUT;
-->


is what you had originally, you changed the first part.........

Code:
 srand;
 $array1 = $line[int rand(@line)];
 $array2 = $line[int rand(@line)];
 $array3 = $line[int rand(@line)];
 $array4 = $line[int rand(@line)];
 @special1 = split (/\|/, $array1);
 @special2 = split (/\|/, $array2);
 @special3 = split (/\|/, $array3);
 @special4 = split (/\|/, $array4);
 $image1 = $special1[7];
 $image2 = $special2[7];
 $image3 = $special3[7];
 $image4 = $special4[7];
   $image1 =~ s/%%IMG%%//ig;
   $image2 =~ s/%%IMG%%//ig;
   $image3 =~ s/%%IMG%%//ig;
   $image4 =~ s/%%IMG%%//ig;


and the second part holds the html code and the variables required.....

Hope that makes sense.
Regards.
Glen.


_________________
glen.m.darby@virgin.net
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
Reply with quote
Post  
Here! Try sticking this in place of all that code you've got there >>

Code:

<!--agorascript-pre
# this is an AgoraCart members only AgoraScript Snippet.  You must be a current member at:
# http://www.AgoraCartPro.com .  Sign up or renew at AgoraCart.com
# Copyright &copy; 2000 - Present by K-Factor Technologies Inc., AgoraScript, and BytePipe.
&capture_STDOUT; open (DATAFILE, "<./data_files/data.file") || die print "Could not open data.file";  @line=<DATAFILE>;
 close (DATAFILE);
 srand;
 $array1 = $line[int rand(@line)];
 $array2 = $line[int rand(@line)];
 $array3 = $line[int rand(@line)];
 $array4 = $line[int rand(@line)];
 @special1 = split (/\|/, $array1);
 @special2 = split (/\|/, $array2);
 @special3 = split (/\|/, $array3);
 @special4 = split (/\|/, $array4);
 $image1 = $special1[7];
 $image2 = $special2[7];
 $image3 = $special3[7];
 $image4 = $special4[7];
   $image1 =~ s/%%IMG%%//ig;
   $image2 =~ s/%%IMG%%//ig;
   $image3 =~ s/%%IMG%%//ig;
   $image4 =~ s/%%IMG%%//ig;
print qq~
<!--this is an AgoraCart members only AgoraScript Snippet.  You must be a current member at:
 http://www.AgoraCartPro.com .  Sign up or renew at AgoraCart.com
 Copyright &copy; 2000 - Present by K-Factor Technologies Inc., AgoraScript, and BytePipe.--\>

<table class="template_mainbackground" width="96%" align="center" border="0" cellpadding="0" cellspacing="1">
          <tr>
            <td  class="template_mainbackground"><span class="style6"><span class="style7">See What's inside our Store:</span></span></td>
          </tr>
  <tr>
   <td>
<table width="100%" border="0" align="center" cellpadding="3" bgcolor="#FFFFFF">
  <tr>
   <td valign=top><center><font face=arial size="2">In $special1[1]:<br><br></font>
    <a href="agora.cgi?cart_id=&amp;p_id=$special1[0]&amp;xm=on">
   <img class="template_image_no_border" src="%%URLofImages%%/$image1" alt="$image1"></a></center>     <center>
     <font face=arial size="2"><br>
     <br>
     </font>
       </center>   </td>
   </tr><tr>
   <td valign=top><center><font face=arial size="2">
   <a href="agora.cgi?p_id=$special1[0]&amp;xm=on">$special1[3]</a></font></center>     <center>
   </center>   </td>
   </tr><tr>
   <td valign=top><center><font face=arial size="2">
      <b><font color="FF0000">Only $sc_money_symbol $special1[2]</font></b></font></center>     <center>
         </center>      <center>
        </center>         <center>
                </center></td>
   </tr>
</table></td>
   </tr>
</table>
~; &uncapture_STDOUT;
-->


Regards.
Glen.


_________________
glen.m.darby@virgin.net
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
Reply with quote
Post  
For documents on some of the agoracart coding and methods, you should see a link at the top of your manager when you first go in...... it will be named "Your Store's DOCS directory"

There are some items in there that may help you in the future.

Regards.
Glen.


_________________
glen.m.darby@virgin.net
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
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