Author |
Message |
caineass
Newbie
Joined: 29 Jul 2006
Posts: 2
Location: Mountain Lakes, NJ
|
 We need to make a second database
We are adding many new products to the site and need to add a second database. I saw somewhere that this could be done. Do any of you know how I can do it or direct me to the url that explains it?
|
Fri Sep 15, 06 9:49 am |
|
 |
Dan
Guest
|
i have not seen a solution that allows for multiple dBs that will combine the orders into a single cart under one id. most of it is pretty straight forward. but there are problems that have gone unresolved or at least left unpublished.
why exactly do you feel you need multiple dBs?
d
|
Fri Sep 15, 06 1:15 pm |
|
 |
scruffymcse
Newbie - One Blade
Joined: 06 Feb 2008
Posts: 13
Location: Ohio
|
I also would be interested in this. A friend of mine is in the process of building an online clothing site. One example i could see (which were trying to figure out ourselves - no luck) would be on our main page we want 3 main links (men,women,children) then when they click on each one it would send them to the men's db of catagories and same w/ woman blah. blah. so in order for this to work i cant have just a flat db i don't think because all the categories would show up no matter what they clicked on... Does anyone have any kind of solution w/ this?
PS sorry to post on another post, but this seemed like a good spot to keep this theory going and dif. options available to us all?
|
Sat Feb 23, 08 5:10 am |
|
 |
scottcrew
Moderator
Joined: 13 Feb 2004
Posts: 7516
Location: The West Side of MI USA
|
I am just not following your reasoning...
We have subcategories available in v5... That would take care of the display of the
Men's categories, Women's categories, and the Children's categories...
HTH!
_________________ God Bless!
Bonnie - AgoraCart Moderator
Get a Gold Membership
|
Sat Feb 23, 08 9:19 am |
 |
 |
Dan
Guest
|
i will be working on a linking solution for this...
display all categories =>click one category => when category displays links only display related subcats or related products.
for example, a clothing merchant. you have men's, women's, boy's and girl's categories displayed on either the storefront or selected pages. after clicking on the men's category for example, you go to the men's product page but all the links in the left nav now display categories like men's pants, men's socks, men's shirts, men's sport coats and etc.
i am really busy right now and this has been asked in the pro forum. i'll post here what i can compose if and when i have time to do it.
please top this post every few days to remind me. it sounds like a fun hack to do but i will forget if not reminded.
d
|
Sat Feb 23, 08 4:14 pm |
|
 |
scruffymcse
Newbie - One Blade
Joined: 06 Feb 2008
Posts: 13
Location: Ohio
|
Ty dan that would help out.. it solves 80% of the problem and i think it would pass!
|
Mon Feb 25, 08 8:54 am |
|
 |
Dan
Guest
|
how does this look?
notice the subcats only display when you're viewing the specfic category. Art and Books are the only categories with subcats.
http://www.cartsolutions.net/store52/agora.cgi
you can download the code here:
right click and save as...
http://www.cartsolutions.net/public/alternative_subcats.txt
copy and paste in the store header replacing you current links code.
d
|
Tue Feb 26, 08 12:54 am |
|
 |
scruffymcse
Newbie - One Blade
Joined: 06 Feb 2008
Posts: 13
Location: Ohio
|
dan,
ty very much this should help! theres so many clothes categories under each one, it just helps to go this route or the page would be long as heck!
ty
-marty
|
Thu Feb 28, 08 6:15 am |
|
 |
harvard
User - One Blade
Joined: 12 Oct 2005
Posts: 39
Location: Auckland
|
Hi Dan
I tried your code in v5 but the sub categories don't show when clicking the main category.
Does this only work in Gold or Pro?
regards
John
_________________ A lack of alternatives, focuses the mind wonderfully!
|
Thu Mar 06, 08 1:09 pm |
|
 |
scottcrew
Moderator
Joined: 13 Feb 2004
Posts: 7516
Location: The West Side of MI USA
|
It works in both.
_________________ God Bless!
Bonnie - AgoraCart Moderator
Get a Gold Membership
|
Thu Mar 06, 08 1:49 pm |
 |
 |
harvard
User - One Blade
Joined: 12 Oct 2005
Posts: 39
Location: Auckland
|
I tried again and made sure I made no mistakes to the best of my knowledge, but still no go.
Would you mind having a look at http://www.nznicheimages.com/store5/ and if you click on either •E. Fine Art Cards or •G. Scenic Photography Cards, there should be some subcategories under them when you click only there are not.
Have I overloooked something?
Really appreciate your help.
John
_________________ A lack of alternatives, focuses the mind wonderfully!
|
Thu Mar 06, 08 2:13 pm |
|
 |
Dan
Guest
|
make sure the use subcats in the main settings is yes and the proper userfield is defined there.
d
|
Thu Mar 06, 08 4:09 pm |
|
 |
harvard
User - One Blade
Joined: 12 Oct 2005
Posts: 39
Location: Auckland
|
The sub categories show with the previous script but not with Dan's new one.
I have made sure the subcats in the main settings is yes and the proper userfield is defined there.
Maybe aliens have invaded the script!
John
_________________ A lack of alternatives, focuses the mind wonderfully!
|
Thu Mar 06, 08 4:56 pm |
|
 |
Dan
Guest
|
well. you can see it works on the example store. so not sure why it doesn't work for you. i'll look at your site... stand by
d
|
Thu Mar 06, 08 6:40 pm |
|
 |
Dan
Guest
|
i'm not seeing any problems. are you using this file for your store header...
store5/html/html-templates/templates/TheAgora/store_header.html
d
|
Thu Mar 06, 08 6:56 pm |
|
 |
harvard
User - One Blade
Joined: 12 Oct 2005
Posts: 39
Location: Auckland
|
Hi Dan
Thanks for your input here, it's appreciated.
Yes, I'm using store5/html/html-templates/templates/TheAgora/store_header.html as the header.
The problem is that the sub-category is not showing when clicking on the category.
So if I clicked •G. Scenic Photography Cards it should show these sub-categories under it:
201. New Zealand
203. Wildlife
209. Lifestyle
210. Northland & Auckland
It is not doing that for some reason.
I've tried with Firefox and IE with same results.
I'll put my header code below in case I goofed anywhere.
Thanks again.
John
<!--BEGIN HEADER TABLE-->
<table id="Table_01" width="100%" border="0" cellpadding="0" cellspacing="1" class="template_mainbackground">
<tr>
<td height="56" colspan="3">
<!--<table width="100%" border="0" cellpadding="0" cellspacing="0" class="template_table_image_background"><tr><td align="center" width=710 height="58" bgcolor="#000000">-->
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="template_mainbackground"><tr>
<td height="58" bgcolor="#000000" align="center">
<!--agorascript-pre
&capture_STDOUT;
if ($sc_self_serve_images =~ /yes/i) {
print qq~<img src="%%URLofImages%%../html-templates/templates/$sc_headerTemplateName/header.gif" height="56" alt="Interniche Greeting Cards" width=710>~;
} else {
print qq~<img src="html/html-templates/templates/$sc_headerTemplateName/header.gif" height="56" alt="Interniche Greeting Cards" width=710>~;
}
&uncapture_STDOUT; -->
</td>
<td align=center>
</td>
</tr></table></td>
</tr>
<tr>
<td width="190" valign="top" bgcolor="#FFFFFF">
<!--START Dynamic Links - cartlinks-->
<!-- .html and .htm pages in the html directory of your store, compiled in real time. Add/Remove/Rename pages in your store's html directory to alter these links-->
<!--agorascript-pre
&capture_STDOUT;
&cartlinks;
$cartlinks =~ s/<ul>\n//ig;
$cartlinks =~ s/<li>//i;
$cartlinks =~ s/<li>/ \| /ig;
$cartlinks =~ s/<\/li>\n//ig;
$cartlinks =~ s/<\/ul>//ig;
print $cartlinks;
&uncapture_STDOUT; -->
<!--END Dynamic Links - cartlinks-->
<!--START Category Listings-->
<!--agorascript-pre { # code to list categories and/or sub categories
# updated for AgoraCart 5.x by Mister Ed Jan 11, 2005
# updated to fit CSS mods by Eric Welin Feb 02, 2005
if ($sc_displayDynamicCategories =~ /yes/i) {
local($sku,$category,$subcategory);
my ($catnumber,$catnumber2)= '';
local(%db_ele,%subcatarray)= ();
if (!($sc_db_lib_was_loaded =~ /yes/i)){
&require_supporting_libraries (__FILE__, __LINE__, "$sc_db_lib_path");
}
&capture_STDOUT;
print qq~<table width="185" border="0" align="center" cellpadding="0" cellspacing="1">
<tr>
<td bgcolor="#FFFFFF"><div align="left"><span class="style6"> </span>
~;
if ($form_data{'product'} && $sc_use_database_subcats =~ /yes/i) {
&get_prod_db_element($db{"product"},*db_ele);
foreach $sku (sort (keys %db_ele)) {
$catnumber = "";
$category = $db_ele{$sku};
$product = $category;
%subcatarray = %{$db_ele{$category}};
$category2 = $category;
$category2=~s/ /%20/g;
$displayme = $form_data{'product'};
if ($sc_count_database_cats =~ /yes/i) {
$catnumber = "(" . $db_ele2{$category} . ")";
}
print qq~\n•<a href="agora.cgi?cart_id=%%cart_id%%&product=$category2" class="ac_left_links" title="$category">$category</a> $catnumber<br>~;
foreach $subcategoryarray (sort(keys %subcatarray)) {
$category3 = $subcategoryarray;
# $category3=~s/ /%20/g;
if ($sc_count_database_cats =~ /yes/i) {
$catnumber2 = "(" . $db_ele{$category}->{$subcategoryarray} . ")";
}
if ($displayme eq $category2){
print qq~\n <a href="agora.cgi?cart_id=%%cart_id%%&product=$category2&$sc_subcat_index_field=$category3" class="ac_left_sub_links" title="$category3">$category3</a> $catnumber2<br>~;
}else{
print "";
}
}
}
} else {
&get_prod_db_element($db{"product"},*db_ele);
foreach $sku (keys %db_ele) {
$category = $db_ele{$sku};
$category_list{$category}++;
}
foreach $category (sort(keys %category_list)) {
$category2 = $category;
$category2=~s/_/ /g;
print qq~\n• <a href="agora.cgi?cart_id=%%cart_id%%&product=$category" class="ac_left_links" title="$category2">$category2</a><br>~;
}
}
print "\n";
print qq~
</div><br></td>
</tr>
</table>
<br>
~;
&uncapture_STDOUT; }
}
-->
<!--END Category Listings-->
<!--START Search Box-->
<form method="post" action="agora.cgi">
<div align="left"><span class="style14">
Search: </span>
<input type="hidden" name="cart_id" value="%%cart_id%%">
<input type="text" name="keywords" size="10" maxlength="40">
<input type="hidden" name="ppinc" value="search">
<input type="submit" name="search_request_button" value="Go">
</div>
</form>
<!--END Search Box-->
<p></p></td>
<td valign="top" class="ac_ppinc_content"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td class="ac_content">
<!--END HEADER TABLE-->
_________________ A lack of alternatives, focuses the mind wonderfully!
|
Thu Mar 06, 08 7:19 pm |
|
 |
Dan
Guest
|
just for giggles restore to your default store header or the defaul links script.
d
|
Thu Mar 06, 08 7:21 pm |
|
 |
harvard
User - One Blade
Joined: 12 Oct 2005
Posts: 39
Location: Auckland
|
Have restored default header
_________________ A lack of alternatives, focuses the mind wonderfully!
|
Thu Mar 06, 08 7:26 pm |
|
 |
Dan
Guest
|
please make a copy of your data.file and rename to data.file.txt then upload someplace and provide a link.
thanks
d
|
Thu Mar 06, 08 7:34 pm |
|
 |
harvard
User - One Blade
Joined: 12 Oct 2005
Posts: 39
Location: Auckland
|
http://www.nznicheimages.com/datafile.txt
John
_________________ A lack of alternatives, focuses the mind wonderfully!
|
Thu Mar 06, 08 7:41 pm |
|
 |
Dan
Guest
|
ok script fixed. i had to add the space replacement for $displayme so it would match the $category2 space replacement. file is updated and anyone using the script prior to this posting date should update so you do not have any surprizes... even if it works ok now.
http://www.cartsolutions.net/public/alternative_subcats.txt
d
|
Thu Mar 06, 08 8:23 pm |
|
 |
harvard
User - One Blade
Joined: 12 Oct 2005
Posts: 39
Location: Auckland
|
Hi Dan
Thanks very much for that. It works a treat!
You are a STAR.
 javascript:emoticon('  ')
Mr. Green
_________________ A lack of alternatives, focuses the mind wonderfully!
|
Thu Mar 06, 08 8:51 pm |
|
 |
Dan
Guest
|
you're welcome. sorry for the hassles. i should have seen that in the first place.
d
|
Thu Mar 06, 08 11:31 pm |
|
 |
|