X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Displaying product images only when user logged In (https://forum.x-cart.com/showthread.php?t=57244)

thygtd 12-27-2010 05:39 AM

Displaying product images only when user logged In
 
Hi all,
please help me with the following concept.
The store has two types of products, say A & B. When the user visits the store they can see only A's product images, B's images will be blurred/unclear images. When the user wants to see the B's actual images and details, they need to login/register. Thank you in advance for your help.

Thanks,
Thy

cflsystems 12-27-2010 05:44 AM

Re: Displaying product images only when user logged In
 
You need to surround that image with an if statement

{if $login ne ""}
SHOW IMAGE
{/if}

Sunray Sales 12-27-2010 06:20 AM

Re: Displaying product images only when user logged In
 
In what file would you put that code?

I want to put an <a href> </a> for the image in the product details page. I'm guessing it would be the same file? But what file would that be?

Thanks.

qualiteam 12-27-2010 07:15 AM

Re: Displaying product images only when user logged In
 
You can use webmaster mode to determine the exact template.

thygtd 12-27-2010 07:39 AM

Re: Displaying product images only when user logged In
 
@ all.. Thanks a lot for the help ! But I think i didnt clearly described what i need. Its not just for a single image.
The cart is for a jewelery. They want people to register/login to see their special design jeweleries. So I am going to categorize it as special designs and make it to display clear images only wen a user logins/registers. Please suggest a solution for this.

Sunray Sales 12-27-2010 10:49 AM

Re: Displaying product images only when user logged In
 
I am going take a shot in helping you.

I did use webmaster mode to tell me what tpl files to modify, in this case it is product-thumbnail.tpl.

Steve is correct in his statement
{if $login ne ""}
SHOW IMAGE
{/if}

I will give you some pseudo code and then you can properly put it in.

If user is not logged in then show jewelry1b.jpg.
If user is logged then show jewelry1.jpg.

Can replace the second statement with just and else statement instead of needing the second if statement.

The first if statement shows the blurred image, indicated by the "b" for the image.

I hope you can figure it out, but that's roughly how I would handle it.

Cheers.

thygtd 12-28-2010 09:17 AM

Re: Displaying product images only when user logged In
 
Quote:

Originally Posted by Sunray Sales
I am going take a shot in helping you.

I did use webmaster mode to tell me what tpl files to modify, in this case it is product-thumbnail.tpl.

Steve is correct in his statement
{if $login ne ""}
SHOW IMAGE
{/if}

I will give you some pseudo code.........

Thanks a bunch for your help. But can u temme how to implement this to a particular category of products ?

cflsystems 12-28-2010 01:15 PM

Re: Displaying product images only when user logged In
 
You can use cat id or product id

{if $login ne "" && $id eq "xx"}.....

$id can be $cat or $productid or $current_category.categoryid or $product.productid... depends in which template you use it.
"xx" is the id number

thygtd 12-29-2010 06:30 AM

Re: Displaying product images only when user logged In
 
Quote:

Originally Posted by cflsystems
You can use cat id or product id

{if $login ne "" && $id eq "xx"}.....

$id can be $cat or $productid or $current_category.categoryid or $product.productid... depends in which template you use it.
"xx" is the id number


Thanks for the tip. I will try it and comeback. I am designer and now learning to customize xcarts, so all your helps are precious to me. Thanks again!


All times are GMT -8. The time now is 03:30 PM.

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