| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Recently Viewed Mod | ||||
|
|
Thread Tools | Search this Thread |
#141
|
|||||||
|
|||||||
Re: Recently Viewed Mod
For those struggling with thumbnails; I hacked it up a little....
In the product.tpl file, I replaced the code with: Code:
Works for me now (NOTE: I have the "Recently Viewed" section on the right side...)
__________________
X-Cart 4.2.2 |
|||||||
#142
|
|||||||
|
|||||||
Re: Recently Viewed Mod
Ok, while I fixed the thumbnail problem, I too am stumped by the "undefinedundefinedundefined" issue...
Anyone out there fix it??? I am no Javascript wiz so I can't figure it out...
__________________
X-Cart 4.2.2 |
|||||||
#143
|
|||||||
|
|||||||
Re: Recently Viewed Mod
The original code works like a charm in 4.1.9. I had some issues, I guess still have with the encoding. It refused to accept some Swedish letters. I also had to change the currency and the way it is displayed since we display the currency symbol after the number and not before but that was pretty easy to do. Unfortunately I don't know how to add language variables in the admin so this can be translated into different languages. For example I tried to
Put lbl_recently_viewed in the "Variable:" box and entered the "Value:" box but nothing happened. Anyone that could enlighten me on how to add the language variables for lbl_no_recently_viewed_items" and "lbl_recently_viewed? |
|||||||
#144
|
|||||||
|
|||||||
Re: Recently Viewed Mod
Quote:
I have to bump this. Seems many ppl are having this problem but so far no solution has been presented. I had to remove this wonderful mod when I discover all the secury warnings and the fact that the pics didn't show in secure mode. Anyone that has any solution for this?????? It should be in the interest of anyone using https... |
|||||||
#145
|
|||||||
|
|||||||
Re: Recently Viewed Mod
Quote:
I just installed this mod with certain changes to product.tpl and my CSS code to make it horizontal. However, I too was having the undefinedundefinedundefined issue. I figured this was whenever a variable hadn't been set yet. You can see you lose an "undefined" the more products you visit Anyway, after some Googling on how to make a javascript if statement based on whether a variable is undefined or not, I've been able to fix it for me. In your recently_viewed.tpl, find this: Code:
and change to this Code:
It's basically saying "only try to write to the document if such-and-such variable IS NOT undefined" Hope this helps someone!
__________________
X-Cart Gold 4.3.1 Military Support Shop :: Army Wife Clothing, Military Support T-Shirts |
|||||||
#146
|
|||||||
|
|||||||
Re: Recently Viewed Mod
I wanted to share a few more things I did in case anyone else is looking to do the same.
To show nothing when there are no recently viewed products (meaning no title or text) I left the title blank (the include at the bottom) and made this change in recently_viewed.tpl Code:
It basically only shows the title if the p1 variable (first product viewed) has been set, else it writes nothing. Use HTML and CSS to style. Note that I removed p4 because I am only showing the last 3. In addition to changing my view to 3products, I made it horizontal as described by Qdox. My full recently_viewed.tpl: Code:
Additionally, I wanted to display this in my main column (I have a 2-column layout: sidebar and main area) on the product pages only. As is, it was showing up on the home page, checkout pages, help pages, etc., at the very bottom. For my product pages, this meant it was showing up BELOW Tell a Friend and Reviews. I didn't want that. This was happening because the include for recently_viewed.tpl comes below the include for everything else (home_main.tpl which loads product.tpl) in my home.tpl file. What I decided to do was to take out all the "extra" stuff on my product page (product.tpl) and pasted it into a new template which I called product_kickers.tpl. Decide where you want to "cut" the page and cut and paste into a new template. Then on home.tpl, my new order is this: Code:
The above code shows the Recently Viewed secton only on a product page AND position it after the main product stuff (home_main.tpl ends up loading my new top-half only product.tpl), beneath that will be recently_viewed.tpl, and then my new product_kickers.tpl which was the lower half of product.tpl. I hope this makes sense and helps.
__________________
X-Cart Gold 4.3.1 Military Support Shop :: Army Wife Clothing, Military Support T-Shirts |
|||||||
#147
|
|||||||
|
|||||||
Re: Recently Viewed Mod
TheWrongGrape, you don't happen to have a SSL and use this in https, secure mode? That's my only issue with this mod as for now. I get security warnings when being logged in, in secure mode and at first the pics are not showing, but after a little while they start to show, but they security warnings keeps on popping.
|
|||||||
#148
|
|||||||
|
|||||||
Re: Recently Viewed Mod
Quote:
Is it because the thumbnail URL for the recently viewed products aren't secure? Try this in product.tpl instad of the line that's there now. Code:
__________________
X-Cart Gold 4.3.1 Military Support Shop :: Army Wife Clothing, Military Support T-Shirts |
|||||||
#149
|
|||||||
|
|||||||
Re: Recently Viewed Mod
Quote:
So instead of: prodImage='<img src="{$product.image_url}"/>'; I write: prodImage='<img src="{$product.image_url|replace:'http://':'https://'}"> I tried the above and some other combinations but it didn't work for me. Please tell me I am wrong.. |
|||||||
#150
|
|||||||
|
|||||||
Re: Recently Viewed Mod
Quote:
Don't forget to put the semicolon ( back in at the end of the new code.
__________________
X-Cart Gold 4.3.1 Military Support Shop :: Army Wife Clothing, Military Support T-Shirts |
|||||||
|
|||
X-Cart forums © 2001-2020
|