X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing and adding new features (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Recently Viewed Mod (https://forum.x-cart.com/showthread.php?t=36753)

peterstagg 07-16-2008 12:45 PM

Re: Recently Viewed Mod
 
Neaisha

It goes in the script that you have to put in the product.tpl file


<script type="text/javascript">
prodImage='{include file="product_thumbnail.tpl" productid=$product.productid image_x=25 product=$product.product type="P" tmbn_url=$product.tmbn_url id="product_thumbnail" }';

prodName='<{$product.product}>';
var p0=('<table><tr><td align = left><a href="'+document.URL+'">'+prodImage+'</a></td><td width = 100%><b><a href="'+document.URL+'">{$product.product}</b></a><br/>ё{$product.taxed_price}</td></tr></table>');
</script>

you set the image_x to the size you want.

see my dev site to view the 25px size images I use

peter

neaisha 07-16-2008 03:23 PM

Re: Recently Viewed Mod
 
hey peterstagg,

no, i wanted to know how to secure the images. right now in IE7, this code displays the images in http vs https. i wanted to know if there's a way to may sure they're displayed securely?

neaisha 07-16-2008 03:49 PM

Re: Recently Viewed Mod
 
took me forever to figure out where i was getting the security message but it's on this page...

https://www.mysite.com/xcart/cart.php?mode=checkout

the thumbnails are the only images in http not https and you get the popup in IE as a result.

i think it has to do with the cookie. given that the images are initially viewed in http mode, they are therefore going to display insecurely. is there anyway to fix this?

hmm...so in the code this is how the thumbnail is being called - prodImage='<img src="{$product.tmbn_url}"/>'; is there any way to make sure that the image is either always secure OR use if/then statements?

William Lam 08-06-2008 03:59 AM

Re: Recently Viewed Mod
 
Quote:

Originally Posted by neaisha
took me forever to figure out where i was getting the security message but it's on this page...

https://www.mysite.com/xcart/cart.php?mode=checkout

the thumbnails are the only images in http not https and you get the popup in IE as a result.

i think it has to do with the cookie. given that the images are initially viewed in http mode, they are therefore going to display insecurely. is there anyway to fix this?

hmm...so in the code this is how the thumbnail is being called - prodImage='<img src="{$product.tmbn_url}"/>'; is there any way to make sure that the image is either always secure OR use if/then statements?


Neaisha,

Have you figured this one out yet, im dying to know how to resolve this.

neaisha 08-06-2008 01:30 PM

Re: Recently Viewed Mod
 
unfortunately nope. i love the mod but this could be one of those things that sorta makes me want to remove it b/c it could impact sales.

neaisha 08-19-2008 08:09 AM

Re: Recently Viewed Mod
 
jeanne

suggested the following code but it omits the images

Code:

{if $cat le '0'}
 <script type="text/javascript">
var p0=('<a href="{$http_location}/manufacturers.php?manufacturerid={$manufacturer.ma nufacturerid}"><br/><b>{section name=position loop=$location step=-1}{$location[position].0|escape}{if not %position.last%} - {/if}{/section}</b></a><br /><br />');
</script>
{else}
 <script type="text/javascript">
var p0=('<a href="{$http_location}/home.php?cat={$cat}"><br/><b>{section name=position loop=$location step=-1}{$location[position].0|escape}{if not %position.last%} - {/if}{/section}</b></a><br /><br />');
</script>
{/if}


i was wondering if you could use something similar to this for the images but specify https_location?

ianfranklin 08-24-2008 09:54 PM

Re: Recently Viewed Mod
 
Is there a way I can call the thumbnail image instead of the product image? I don't want to have it re-size the images because they look grainy, especially in IE.

gotpump 09-23-2008 08:35 PM

Re: Recently Viewed Mod
 
The only issue I'm having is when there is only 1 picture displayed. Below that pictures price it displays:

undefinedundefinedundefined.

Any suggestions?
Did I miss Something?

neaisha 10-20-2008 08:27 AM

Re: Recently Viewed Mod
 
ok, i'm still having the security warning in IE. i tried this code...

Code:

{if $current_location eq $http_location}
{include file="customer/main/recently_viewed.tpl"}
{else}&nbsp;{/if}


Janel 10-29-2008 05:43 AM

Re: Recently Viewed Mod
 
grrrr.... I had this working perfectly before I installed newest version of xcart and now when I go to implement this mod I can't get my images to appear.

Any ideas? I do store them in file system and not database like I see mentioned earlier as a possible problem.


All times are GMT -8. The time now is 03:35 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.