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
Tell a friend
Author Message
Reply with quote
Post Tell a friend 
Hello,

[edit] sorry, this should perhaps be moved to Misc Agoracart [edit]

I'm going to set up a tell a friend link but I have a question: The feature will be sending a link to a database-generated page containing a single product. Before sending the email, I need to process the query string in order to take out the cart_id (that's trivial) but when the friend clicks the link to check out this awesome product, he/she won't have any cart_id:

eg. the page link is:

agora.cgi?cart_id=nnnnnnn.nnnnn&product=productCategory&ppinc=1a&p_id=00004

and I'll send this

agora.cgi?product=productCategory&ppinc=1a&p_id=00004


In the event that he/she clicks on the buy now button, will AgoraCart automatically assign a new cart_id to that customer?


Henri

View user's profile Send private message Send e-mail Visit poster's website
Reply with quote
Post  
Henri,
In v5.x AgoraCart automatically assigns new cart_ids when either a cart _id in a URL does not match the shopping_cart info in the store or there isn't a cookie already in the browser.

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  
Thank you Bonnie

I did notice that while loading pages after having removed the cart_id bit from the query string.
I have still one step to complete. So I have this "tell a friend" page with a form and all hidden information I'll be needing. The from is posted via a submit button whose name is submit_tellafriend_button. Now, in agora.cgi, I've added an elseif statement that checks for it:

Code:

} elsif (&form_check('submit_tellafriend_button')) {
&tell_a_friend;
&redirect;
&call_exit;
}


Can I add both subroutines (ie tell_a_friend and redirect) to the agora.cgi file or should I create a new .pl file where I would be adding my own subroutines? In that case, what is the procedure to follow in order to make agora aware of the existance of those? I'll have to instruct agora to load the file; is calling require_supporting_libraries the proper way to do that?

Now, for the actual redirection. Is using something like the following ok?

Code:

$redirect= qq~$sc_doctype
<html><head><title></title>
<META HTTP-EQUIV=\"refresh\" CONTENT=\"0;url='$href'\">
</head><BODY>Redicting you to the product...</BODY></html>~;
}
 print $redirect,"\n";


TIA

Henri

View user's profile Send private message Send e-mail Visit poster's website
Reply with quote
Post  
Henri,
You do NOT want to edit any of the core files, as they get overwritten when the file gets upgraded and you'd lose all of your edits.
It is best to create a .pl file and put it in the 'add-ons' directory.

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  
I understand that.
If I don't touch the agora.cgi script, that means I can't use agora as a dispatcher. I'll have to direct the form's action to add_ons/tell_a_friend.pl, am I right?

Code:

<form method="post" action="add_ons/tell_a_friend.pl">
<fieldset>
   <!--agorascript-pre {
      return "<legend>Tell a Friend About &quot;$form_data{'title'}&quot;</legend>";
   }
   -->
   <div class="form-item">
      <label class="form-input-label">Addressee's Name:</label>
      <input type="text" name="Addressee_Name" size="28" maxlength="55" value="" />
      <div class="clearBoth"></div>
   </div>
   <div class="form-item">
      <label class="form-input-label">Addressee's E-mail:</label>
      <input type="text" name="Addressee_Email" size="28" maxlength="55" value="" />
      <div class="clearBoth"></div>
   </div>
   <div class="form-item">
      <label class="form-input-label">Your Message:</label>
      <textarea name="Addressee_Message" cols="52" rows="5"></textarea>
      <div class="clearBoth"></div>
   </div>
</fieldset>
<div class="floatRight">
   %%make_hidden_fields%%
   <input type="submit" name="submit_tellafriend_button" value="Send" />
</div>
</form>


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