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
Placing a View Cart button on productPage.inc
Author Message
Reply with quote
Post Placing a View Cart button on productPage.inc 
How would I go about placing a View Cart button on my Product Page? I put one in, and not only did it make all of the product thumbnails show up in a vertical row instead of a grid, but the View Cart button showed up three times on the page.

I didn't use anything particularly fancy for the view cart button. Just the same code from the show item page.
Code:
<a href='%%scripturl%%?dc=1&amp;%%href_fields%%'><img border="0" src="%%ButtonSetURL%%/viewcart.gif"></a>


Is this something that I would actually have to do in the agora.cgi file? or in one of the library files rather than in the .inc file?

http://www.23deep.com/agora/store5/agora.cgi

Thanks.

Reply with quote
Post  
Please post your productPage.inc file's contents with the view cart button coding that you added.

The fact that your your thumbnails were no longer in the grid tells me that the file was probably not uploaded in ASCII mode.

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  
This is the productPage.inc file I'm uploading, with the view cart button at the top. The page is a slight modification of the productPage-4a.inc file. The only things I've changed are minor cosmetic changes. I've set the border tables to 0, I've removed the product number and price, and I turned the thumbnail into the "more info" link rather than having a seperate link.

I'm uploading in Bullet Proof FTP and I uploaded it in ASCII.

Quote:

<a href='%%scripturl%%?dc=1&amp;%%href_fields%%'><img border="0" src="%%ButtonSetURL%%/viewcart.gif"></a>

<!--agorascript-pre
{
# This file allows you to have any number of
# rows by setting the following variable
$ags_across = 5; # Number in a row

$ags_row_wd=int(100.0/$ags_across);
local ($myans)="";
if ($rowCount == (1+$minCount)) { #first one
$ags_row_item=0;
$ags_row_nmbr=0;
$ags_tot_item=0;
$myans .= '<tr><td colspan="3"><table width="100%" border="0" ALIGN="left">'."\n";
}
$ags_row_item++;
$ags_tot_item++;
if ($ags_row_item > 1) { # last one
if ($ags_row_item == $ags_across) {
$ags_row_item=0; #reset counter
$ags_row_nmbr++;
}
$myans .= '<td width="'.$ags_row_wd.'%" valign="top">';
} else { #first one
$myans .= '<tr><td width="'.$ags_row_wd.'%" valign="top">';
}
$myans.=qq~<form method="post" action="%%scriptURL%%">
%%make_hidden_fields%%
<table width="100%" ALIGN="left">
~;
return $myans;
}
-->
<tr><td class="ac_product_image">
<a style="border-style: none" href="%%scripturl%%?cart_id=&amp;p_id=%%ProductID%%&amp;xm=on&amp;ppinc=walletdetail">
%%image%%
</a>
</td></tr>
<!--agorascript-pre
{
local ($myans)="";
if ($ags_row_item == 0) { # last one
$myans .= '</table></form></td></tr>'."\n";
} else { # first one
$myans .= '</table></form></td>'."\n";
}
if (($rowCount == ($maxCount)) || ($rowCount == ($num_returned)))
{ # very last one
if (!($ags_row_item == 0)) { # finish the row
# if ($ags_row_nmbr > 0) { # finish the row with blanks
while ($ags_row_item < $ags_across) {
$ags_row_item++;
$myans .= '<td width="'.$ags_row_wd.'%">&nbsp; </td>';
}
# }
$myans .= '</tr>'."\n";
}
$myans .= '</table></td></tr>'."\n";
}
return $myans;
}
-->


I've tried inserting the viewcart link as that as well as:

Quote:
<table width="100" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align=center><a href='%%scripturl%%?dc=1&amp;%%href_fields%%'><img border="0" src="%%ButtonSetURL%%/viewcart.gif"></a></td>
</tr>
</table>


Reply with quote
Post  
If you are wanting only 1 button on the page, try this:
Code:

<!--agorascript-pre
{
# This file allows you to have any number of
# rows by setting the following variable
$ags_across = 5; # Number in a row

$ags_row_wd=int(100.0/$ags_across);
local ($myans)="";
if ($rowCount == (1+$minCount)) { #first one
$ags_row_item=0;
$ags_row_nmbr=0;
$ags_tot_item=0;
$myans .= '<tr><td colspan="3"><a href="%%scripturl%%?dc=1&amp;%%href_fields%%"><img border="0" src="%%ButtonSetURL%%/viewcart.gif"></a><table width="100%" border="0" ALIGN="left">'."\n";
}
$ags_row_item++;
$ags_tot_item++;
if ($ags_row_item > 1) { # last one
if ($ags_row_item == $ags_across) {
$ags_row_item=0; #reset counter
$ags_row_nmbr++;
}
$myans .= '<td width="'.$ags_row_wd.'%" valign="top">';
} else { #first one
$myans .= '<tr><td width="'.$ags_row_wd.'%" valign="top">';
}
$myans.=qq~<form method="post" action="%%scriptURL%%">
%%make_hidden_fields%%
<table width="100%" ALIGN="left">
~;
return $myans;
}
-->
<tr><td class="ac_product_image">

.....Rest of ppinc page's code.......


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  
Thanks for your help. I'll upload that when I get home, since I don't have any access to FTP here at work.

Yeah, my original thought was for that button and for a complete order button, but that's unnecessary since they can complete an order from the cart. I just wanted a view cart so that customer's wouldn't have to click on another product after adding something to the cart just so they could get back to the cart and complete their order.

Thanks again.

Reply with quote
Post  
You know, you could put that button in the store header and then it will always be visible....


_________________
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 only reason I don't want to do that, is that I don't want a View Cart button visible when you're actually in the cart.

I don't want to confuse customers into thinking that they aren't in the cart when they are, just because there's a button telling them to go where they already are.

Reply with quote
Post  
If they are accessing the store header, they ARE in the cart...
I don't understand what you are saying...


_________________
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'm using the term cart as "checkout" not as "all of AgoraCart"

A customer is not going to associate accessing the store header with "being in the cart", they will associate "being in the cart" with "viewing their choices before checking out"

To a customer there are two sections where the access the store header:
Being in the Store
which are productPage.inc files
and checking out of the store
which are the view cart, order form, and order view before they go to the payment gateway.

That's what I meant.

Reply with quote
Post  
That code did it! Thanks for your help.

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