List Popular Categories

General ShopSite user discussion

List Popular Categories

Postby menarai » Tue Jun 10, 2008 11:29 pm

Is there any way to track the most popular categories of a shopsite store (by hits or by purchases; either is acceptable) and display them as a linked list?
menarai
 
Posts: 11
Joined: Sat Mar 22, 2008 11:23 pm

Postby Jim » Thu Jun 12, 2008 11:12 am

There is nothing built into ShopSite that would do this. You could however, keep track of Items that were ordered and create a page in your store that displayed the most frequently purchased items as determined by what has been ordered. You could also (if you have a 9.0 Pro version) assign these items as cross sell items that display in the shopping cart when people are purchasing other items from your store.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Postby menarai » Tue Jun 24, 2008 2:06 am

Thanks for the info. I have a somewhat related follow-up question. There are a bunch of links on the home page that are being generated by shopsite code. I'm pretty sure it's a static list, despite the fact that it says "Popular Categories." My question is how are these categories being assigned to the home page? I don't see any correlation between any of the values for those pages in the database. I also don't know how to "assign items" to the home page or includes.
menarai
 
Posts: 11
Joined: Sat Mar 22, 2008 11:23 pm

Postby Jim » Tue Jun 24, 2008 8:21 am

Without seeing the template for the page it would be difficult to say how the links are being generated.

To assign items to a page you go to the Pages screen, select the page (your main page name) and click the Assign items button. This will bring up a screen where you can select either pages or products to assign to the page. If you select the Pages option you can choose the pages you want to assign and in any of the ShopSite provided templates they will be displayed in the links section of the page.

If the page is not using a ShopSite provided template then the links may be being generated by an "include" file. If so then you would need to edit that file and manually insert the html code to display the links.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Postby menarai » Tue Jun 24, 2008 2:41 pm

Here's the "Catnav" include, where the links are being generated from:

Code: Select all
<!-- Category Navigation -->
[-- VAR.SetCatNavLink "no" --]
[-- VAR.PageLinkClass "CatNav_link" --]
<tr>
   <td class="CatNav_title">
      &nbsp;&nbsp;[-- VAR.CatNavTitle --]
   </td>
</tr>
<tr>
   [-- IF VAR.CatNavTitle "POPULAR CATEGORIES" --]
   <td class="CatNav_link_popular_categories">
   [-- ELSE --]
   <td class="CatNav_link">
   [-- END_IF --]
      [-- LOOP LINKS --]
         &nbsp;&nbsp;&nbsp;&nbsp;[-- LINK --]<br>
      [-- END_LOOP LINKS --]
   </td>
</tr>

[-- IF VAR.CatNavTitle "POPULAR CATEGORIES" --]
   [-- VAR.SetCatNavLink "yes" --]
   <script language="JavaScript" type="text/javascript">
      var len=0
      string= '<tr><td class="CatNav_title">&nbsp;&nbsp;POPULAR CATEGORIES</td></tr>'
      string+='<tr><td class="CatNav_link_popular_categories">'
      [-- LOOP LINKS --]
         string+='&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'+[-- LINK --]+'<br>'
      [-- END_LOOP LINKS --]
      string+='</td></tr>'
      setCookie('catnav',string,1)
   </script>
   [-- VAR.SetCatNavLink "no" --]
[-- END_IF --]


I checked through all of the includes, and nothing is setting these links from what I can tell. It seems like these pages/categories were assigned to the home page. However, I do not see the home page anywhere on the pages list (it only seems to have products and categories listed, if that helps).
menarai
 
Posts: 11
Joined: Sat Mar 22, 2008 11:23 pm

Postby Jim » Tue Jun 24, 2008 3:47 pm

The links are being generated by the code like
[-- LOOP LINKS --]
&nbsp;&nbsp;&nbsp;&nbsp;[-- LINK --]<br>
[-- END_LOOP LINKS --]


So it is reading the pages that are assigned to that particular page and including the links for those pages. The code is in a script so it looks like it is combining all the links into one. You just need to check and see what pages are assigned to that particular page.

The code also contains checks for the value of several VAR statements
[-- VAR.CatNavTitle --] and [-- IF VAR.CatNavTitle "POPULAR CATEGORIES" --] . Since these aren't defined in the section of code you posted you will have to check your other files to see where these are being set.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Postby menarai » Wed Jun 25, 2008 10:36 am

That variable is set by the page that includes it (the home page).

What's baffling is I don't see any way to assign pages to the home page. It's not listed in the "Pages" area.
menarai
 
Posts: 11
Joined: Sat Mar 22, 2008 11:23 pm

Postby Jim » Wed Jun 25, 2008 12:44 pm

It is entirely possible that your main page isn't being generated by ShopSite. The page could have been created in another application and place on the site. View the source of the page and if the page was generated by ShopSite there is probably some text near the top of the page that says that the page was generated by ShopSite and what template was used in generating it. Something like
Code: Select all
<meta name="generator" content="ShopSite Pro 9.0 (sc - Modern.sst)">


It is also possible that the main page was removed from your ShopSite backoffice but the html page was not removed. In this case you would need to recreate the page in ShopSite if you want to have ShopSite generate changes for the page.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Postby menarai » Wed Jun 25, 2008 3:46 pm

I am seeing that meta tag on the home page.


Code: Select all
<meta name="generator" content="ShopSite Pro 9.0.2 (data - homepage)">


Also I inserted a blank comment <!-- --> into the homepage template--and it seems you're right; even after regenerating the entire site the change did not show up.
menarai
 
Posts: 11
Joined: Sat Mar 22, 2008 11:23 pm


Return to User Forum

Who is online

Users browsing this forum: No registered users and 72 guests

cron