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
More than one word category
Author Message
Reply with quote
Post More than one word category 
How can I get a user field, or something to show a more than one word category on the main front page. I been trying to ponder this because the category section of the products only allows for one word, but I would like to display multiple words on the main site. And because there may be same categories for many products I cant simply use %%userFieldOne%% or something based off one product description, unless there is a reference to learning agorascript, so i can make it retreive the same for all products but based on a user field instead, or least pull the userfield with the category and just display the more "human friendly" category name.


_________________
-Karl Blessing
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number
Reply with quote
Post  
And no i dont want to pay 50$ for what was probally just 2 or 3 lines of code to convert _ to space, I'd do this too if I knew which file handled the category.


_________________
-Karl Blessing
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number
Reply with quote
Post  
I'd suggest you check the archives of the Yahoo agora2 forum. I believe the code may have been posted there in the past week or two. It is also a freebie.

Reply with quote
Post  
hell-o
newer versions of agoracart should strip the underscore when using the %%category%% token.
regards,
dan

Reply with quote
Post  
I'm refering to this on the main index.html

Code:

@category_list = &get_prod_db_category_list;
foreach $category (sort(@category_list)) {
  print "<a href=\"$sc_store_url?cart_id=&xm=on&product=",
    "$category\">$category</a>&nbsp;&nbsp;&nbsp;\n";


it uses the $category but returns as one word, or as the underscore, and far as I can tell agorascript doesnt have any formating function.


_________________
-Karl Blessing
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number
Reply with quote
Post  
eh found it.

Code:

foreach $category (sort(keys %category_list)) {
   $category2 = $category;
  $category2=~s/_/ /g;
  print "&nbsp;&nbsp;<a href=\"agora.cgi?cart_id=%%cart_id%%&product=",
    "$category\"> $category2 </a><br>\n";
}



_________________
-Karl Blessing
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number
Reply with quote
Post  
hell-o
yep. the script in the left menu strips the underscore but the script in the content area doesn't. you can adapt the menu script to layout horizonally or you can adapt the content script to strip the underscore.
i thought originally you were wanting to use a script or something to display the category. you can do this in the bottom of the store footer with the %%category%% token. this token's support strips the underscore in newer versions.
regards,
dan

Reply with quote
Post  
Well I've also run into a problem allowing & in the description, so adapted that script to replace nandn with & display wise, cuz I needed to say R&B as a description.


_________________
-Karl Blessing
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number
Reply with quote
Post  
hell-o
it's not a good idea to edit the supporting script to allow special characters, if that's what you did.
in the description field if you need to add special characters use code to represent special characters.
in your case you need:
R&B
the html code for the ampersand is:
&amp;
so you would want to use it like this:
R&amp;B

if you're referring to the product name or category then try and add the above there. i think it will work.


the exclusion of special characters not only protects the program functions but is a security issue. please seek help to accomplish something before changing code arbitrarily.

regards,
dan

Reply with quote
Post More than one word category 
The following code as it appears in the store_header.inc file for left-hand column navigation will take your two word category name, as set up in the manager using the underscore to separate the two words, and remove the underscore and replace it with a space.

foreach $category (sort(keys %category_list)) {
$category2 = $category;
$category2=~s/_/ /g;
print "&nbsp;&nbsp;<a href=\"agora.cgi?cart_id=%%cart_id%%&product=",
"$category\"> $category2 </a><br>\n";
}

This appears to be the case if I look at the source code of the "completed/compiled" index page. I say appears since the link is underlined when seeing the page.

I tried to remove the underline but to no avail by using the following code.

foreach $category (sort(keys %category_list)) {
$category2 = $category;
$category2=~s/_/ /g;
#to remove underline in link
$category2=~s/style=\"text-decoration: none\"//g;
print "&nbsp;&nbsp;<a href=\"agora.cgi?cart_id=%%cart_id%%&product=",
"$category\"> $category2 </a><br>\n";
}

I have not been able to get the underlining to disappear. Is there something I'm missing here?

Also where is file located that contains the page titlefor the auto-generated category pages so I can remove the underscore from that as well.

tia,
Elaine Kula


_________________
P.S. Did you wear jewelry today?
Was it gorgeous?
It could have been ...
http://www.antiquingonline.com/
View user's profile Send private message Visit poster's website
Reply with quote
Post More than one word category 
Okay, I figured out how to eliminate the underlining in the category names in the left-hand column.

Seems agora won't "observe" the in-line style
$category2=~s/style=\"text-decoration: none\"//g; #to remove the underlining in the href link

in (which I commented out below since it would not work for me)

foreach $category (sort(keys %category_list)) {
$category2 = $category;
$category2=~s/_/ /g;
#$category2=~s/style=\"text-decoration: none\"//g;
print "&nbsp;&nbsp;<a class=\"purple\" href=\"agora.cgi?cart_id=%%cart_id%%&product=", #class purple eliminates underscore
"$category\"> $category2 </a><br>\n";
}

so I set up an external style sheet and referenced the class for the a.link as above to eliminate the underlining and it works.

Now I still need to know where the file is to locate the page category titles to eliminate the underscore in the page titles.

I hope I'm making some sense here.

Elaine Kula


_________________
P.S. Did you wear jewelry today?
Was it gorgeous?
It could have been ...
http://www.antiquingonline.com/
View user's profile Send private message 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