Recently Viewed items - Anyone??
Printed From: ProductCart E-Commerce Solutions
Category: ProductCart
Forum Name: Customizing ProductCart
Forum Description: Exchange messages with other users that are customizing ProductCart.
URL: https://forum.productcart.com/forum_posts.asp?TID=1565
Printed Date: 21-November-2024 at 5:19pm Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com
Topic: Recently Viewed items - Anyone??
Posted By: worldofrugs
Subject: Recently Viewed items - Anyone??
Date Posted: 24-April-2008 at 2:33pm
Newbie at ProductCart V.3.15a with apparel add-on...
Anyone any ideas on how you can list the recently viewed items horizontal instead of vertical? Standard it shows 10 items (have reduced this to 5) and showing it vertical... I like to have then like in 1 row horizontal..
In the SmallRecentProducts.asp I can not really find anything back about it. However I have to admit, I'm not an ASP programmer
If you have done this before and/or have any ideas, please let me know. Thanks all!
|
Replies:
Posted By: scarlettscloset
Date Posted: 28-April-2008 at 2:31pm
I can't help with that question. I also have a question about "recently viewed items."
Exactly where in the header or footer is the code snippet supposed to go? In the table with the other "search" functions or anywhere? Please advise. Scarlett
------------- Scarlett
|
Posted By: inetbizo
Date Posted: 28-April-2008 at 5:29pm
footer.asp lines 1-18 I have:
</td> <td class="pcColumnSpacer"></td> <td id="pcRight"> <!-- START small box --> <div id="pcSmallsearchbox"> <!--#include file="SmallSearchBox.asp" --> </div> <!-- END small search box --> <!-- START small shopping cart --> <!--#include file="SmallShoppingCart.asp" --> <!-- END small shopping cart -->
<!-- START small Recent Products --> <div id="pcRecentProducts"> <!--#include file="smallRecentProducts.asp" --> </div> <!-- END small Recent Products --> |
------------- Current Project http://canvasusa.com - http://www.canvasusa.com
|
Posted By: scarlettscloset
Date Posted: 28-April-2008 at 6:00pm
When I place the code snipper there I get this error message:
Microsoft VBScript compilation error '800a0411'
Name redefined
/store/pc/smallRecentProducts.asp, line 5
dim MaxProducts,ViewedPrdList,tmpIndex,tmpIndex1,tmpIndex2,tmpVi ewedList,tmpVPrdArr,tmpVPrdCount,connTemp2
------------- Scarlett
|
Posted By: inetbizo
Date Posted: 29-April-2008 at 9:36am
You should open a ticket with earlyimpact or whoever you bought the cart from, there.
------------- Current Project http://canvasusa.com - http://www.canvasusa.com
|
Posted By: Hamish
Date Posted: 29-April-2008 at 9:40am
scarlettscloset wrote:
dim MaxProducts,ViewedPrdList,tmpIndex,tmpIndex1,tmpIndex2,tmpVi ewedList,tmpVPrdArr,tmpVPrdCount,connTemp2
|
Hi, It looks like there's an extra SPACE in tmpVi ewedList which shouldn't be there, it should read tmpViewedList - or is that a result of you posting the code?
|
Posted By: worldofrugs
Date Posted: 29-April-2008 at 9:45am
It's great scarlettscloset got helped , but has anyone an answer to my post ??
|
Posted By: Hamish
Date Posted: 29-April-2008 at 9:55am
I don't use that module myself, but taking a VERY quick look - it seems it's styled with CSS which is in-line with the code. I haven't got time at the moment to investigate properly, but I'd advise reformatting the code in the member to make it easier to understand with a few additional line breaks & going from there.
|
Posted By: worldofrugs
Date Posted: 29-April-2008 at 10:08am
Thanks Hamish, I'll see what else I can find out in the CSS.. Meanwhile if someone has an anwer.. please!
|
Posted By: scarlettscloset
Date Posted: 29-April-2008 at 10:30am
Sorry to hijack your thread frugs. Thanks for your help Hamish, everyone. Scarlett
------------- Scarlett
|
Posted By: worldofrugs
Date Posted: 29-April-2008 at 11:08am
Not a problem Scarlett,
I did mean to blame you for anything.. Glad you case got solved Simply made the reply as I'm still trying to find out an answer to my question as well. So no hijacking done Scar!
|
Posted By: avalight
Date Posted: 29-April-2008 at 8:20pm
While we are talking about the recently viewed items, I want to put this code on a plain ole HTML page. I tried to cut and paste the code from the smallrecentproducts.asp file and that doesn't work. Is there any other way? Or do I need only part of that code. Should I start a new post for this...same for small shopping cart onto a html page. I did that for the smallsearchbox.asp code, that works. Thanks
------------- Curt
|
Posted By: Hamish
Date Posted: 30-April-2008 at 3:57am
Hi Avalight. Why do you want to put this on a static page? - It would only show whatever YOUR list was at the time you grabbed the data - pretty much defeating the purpose of the code.
If you really do want to do this then you need to "view source" against the page in the front end and grab <div id="recentprds"> through to </div>
|
Posted By: Hamish
Date Posted: 30-April-2008 at 2:09pm
Hi Avalight, Sorry, I think I misunderstood your post - You can create a "nearly" static page where the only ASP element is recently viewed items. It's not ythat hard to do, but it will still be an asp page.
|
Posted By: avalight
Date Posted: 01-May-2008 at 12:20am
Hamish I didn't think I could mix asp code on a html page. I just noticed the store map html page doesn't have all the generated code like the header.asp and footer.asp pages do, the recently viewed being one of them.
------------- Curt
|
Posted By: avalight
Date Posted: 01-May-2008 at 12:35am
For example, I don't think I can put this code on a html page and have it work... <!--#include file="smallRecentProducts.asp"-->
------------- Curt
|
Posted By: Greg Dinger
Date Posted: 01-May-2008 at 1:02am
Avalight, the only way to get ASP scripting to run is to do so on a .ASP page. You cannot do this on a .html page. This applies to smallRecentProducts.asp.
Are you trying to implement the smallRecentProducts include on static HTML pages because you want to make your store's visual interface consistent on non-store pages, but want to avoid losing your search engine placement for old pages that have been around a while?
On a store we launched this week, we were confronted with over 30 old product category pages from the client's prior store. ProductCart was replacing a different cart. The old pages have strong placement and we didn't want to lose those listings. So we used http://www.isapirewrite.com - www.isapirewrite.com to create rules that cross-reference the old .HTM pages to the ProductCart pages, specifying these as 301 redirects.
A similar strategy could be accomplished for you, if this indeed is your goal. Create new .asp pages which duplicate your .htm pages, include whatever new functionality you require, and use IR to redirect the old page references to the new pages.
Would that achieve your goals?
------------- GreyBeard Design Group
Certified ProductCart Developer
Web Design/Development/Hosting
http://tinyurl.com/5c8t4t" rel="nofollow - Add-Ons & Custom Code |
|
Posted By: Hamish
Date Posted: 01-May-2008 at 3:16pm
Hi Worldofrugs, This topic has wandered a bit away from your original request - obviously you touched upon a subject several people are interested in.
Did you have any luck getting what you wanted with the CSS?
|
Posted By: worldofrugs
Date Posted: 01-May-2008 at 3:20pm
Afraid not Hamish,
Actually have not found no CSS references for the recently viewed items.
So it's still an open wish!
Thanks for your reply
|
Posted By: ProductCart
Date Posted: 01-May-2008 at 4:05pm
Please see http://wiki.earlyimpact.com/widgets/recently_viewed_products_widget#changing_the_style - this article in the new ProductCart WIKI .
------------- The ProductCart Team
Home of ProductCart http://www.productcart.com" rel="nofollow - shopping cart software
|
Posted By: worldofrugs
Date Posted: 01-May-2008 at 4:21pm
That's great, but formatting the colors etc.. is not what I'm looking for... I'm trying to list these products horizontal....
|
Posted By: Hamish
Date Posted: 01-May-2008 at 7:06pm
Hi worldofrugs, OK - Here's my starter for ten. You need to customise smallRecentProducts.asp On line 74 : <div style="clear:both; padding-bottom: 5px;"> Change this to read something like :-
<div id="recPrdHz">
Then in pcStoreFront.css add something like : #recPrdHz { float:left; padding: 5px; border: 1px dotted orange; }
The border is just there to help see what's going on & can be dropped/changed etc. You may also want to do something with the DIV just after the two FOR loops end (Next statements).
HTH
|
Posted By: Hamish
Date Posted: 01-May-2008 at 7:12pm
By the way - When I tried this I placed the Include for smallRecentProducts.asp as the last line in my header.asp file so that it appeared at the top of the main page. If you want it horizontal you will need to keep it outside any narrow area, otherwise the "float" won't be able to float .
|
Posted By: worldofrugs
Date Posted: 02-May-2008 at 4:26pm
I'll try it over the weekend.. I'll keep you posted.. Thanks all!
|
Posted By: worldofrugs
Date Posted: 05-May-2008 at 10:44am
Hamish, You the man!!
It indeed nicely comes horizontal... Any idea how to center this on the page? I have tried but no luck... If not, does not matter, as it was most important to get it horizontal, but would look better
Again, Thanks Hamish!
|
Posted By: scarlettscloset
Date Posted: 07-May-2008 at 12:33pm
As a follow up for future troubleshooting: when the clear list link disappears to "show recent products," check "languages.asp" file to make sure it is current with the product cart version you are running.
Thanks Dan!
Scarlett
------------- Scarlett
|
Posted By: Hamish
Date Posted: 07-May-2008 at 12:43pm
Hi Worldofrugs, Have you got a link you can post - I'll take a look.
|
Posted By: worldofrugs
Date Posted: 07-May-2008 at 1:00pm
Hi Hamish,
Again thanks so much for helping me to get it horizontal... I assume
you like to look into it to see if we're able to center it on the
page... (why else would you ask for my address?)
I'm currently working on the shop. Changing layouts, colors, etc.... I send you the link via PM..
The recently viewed items will be at the bottom of the page.
Lemme know what you find out....
|
Posted By: worldofrugs
Date Posted: 20-May-2008 at 10:13am
Have tried several things, but was still unable to center it..
Have you looked at this yet Hamish (or maybe someone else) ??
|
Posted By: cmason
Date Posted: 08-August-2008 at 11:40am
Have you received an answer on this?
What I encountered on smallrecentproducts.asp (V3.12) is that the CSS div "recentprds" was undefined in the CSS, so I made my own. Next thing I decided to change was to present the product list as an unordered list.
I stripped out all the embedded styles like "<div style="margin-bottom: 10px;">" because using <ul> styling I can automatically take care of the spacing.
This code also has a custom div to align the "Clear List" link to the right, another change to use the same image for each item (we have wide variety of product image dimensions and using an image for the <li> would have broken the consistent look), and another to add the tooltip, but hopefully you can see how/where to add the UL/LI tags
"
'Show SKU?
pcIntShowSKU = 0
%>
<% 'CW added ul ,changed class to small, added <<>> %>
<ul>
<li class="small">
<% if pcvStrSmallImage <> "hide" then 'CW added tooltip and changed image to use checkmark due to prd image size issues%>
<a href="viewPrd.asp?idproduct=<%=tmpVPrdArr(0,tmpIndex)%>"><img src="../../ImagesSite/CheckmarkOrangeYellow.gif" alt="Bullet" align="left" style="border:none; padding-top: 2px; padding-bottom: 5px; padding-right: 4px;"></a>
<% end if %>
<a href="viewPrd.asp?idproduct=<%=tmpVPrdArr(0,tmpIndex)%>" <%if scStoreUseToolTip="1" then%>onmouseover="javascript:document.getPrd.idproduct.value='<%=tmpVPrdArr(0,tmpIndex)%>'; sav_callxml='1'; return runXML1('prd_<%=tmpVPrdArr(0,tmpIndex)%>');" onmouseout="javascript: sav_callxml=''; hidetip();"<%end if%>><%=ClearHTMLTags2(tmpVPrdArr(1,tmpIndex),0)%></a></li>
</ul>
<% if pcIntShowSKU=1 then%><span class="smaller"><%=pcvStrSku%></span><%end if%>
</div>
<%exit for
end if
Next
Next
'CW inactivated <div style="clear:both; text-align: right; margin: 5px;">, added <<>>, and div-class
%>
<div id="alignRight" class="small"><a href="javascript:ClearViewedPrdList();"><< <%=dictLanguage.Item(Session("language")&"_viewProducts_2")%> >></a> </div>
"
This is the CSS we currently use for left/right columns that controls the unordered list for recentprds
"
#pcLeft ul, #pcRight ul {
margin: 0 0 0px 7px;
padding: 0 5px;
color:#999999;
}
#pcLeft li, #pcRight li {
list-style-type: none;
margin: 2px 0 0 0;
border-bottom:1px solid #CCCCCC;
padding: 0 5px;
border-left:2px solid #F47400;
border-right:1px solid #CCCCCC;
}
"
You can see it at http://www.constructionlifters.com.
You'd have to create your own ul/li definitions for recentprds. Be careful about how many products you display horizontally.
There are several different ways to center <ul>s, take a look at the following for some clues
http://css.maxdesign.com.au/listutorial/horizontal_master.htm
http://matthewjamestaylor.com/centered-menus/
http://matthewjamestaylor.com/blog/beautiful-css-centered-menus-no-hacks-full-cross-browser-support
Christie Mason
|
|