Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Displaying product images only when user logged In

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 12-27-2010, 05:39 AM
 
thygtd thygtd is offline
 

Advanced Member
  
Join Date: Dec 2010
Posts: 31
 

Smile 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
__________________
X-Cart/LiteCommerce version v4.4.1
Reply With Quote
  #2  
Old 12-27-2010, 05:44 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,197
 

Default 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}
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #3  
Old 12-27-2010, 06:20 AM
 
Sunray Sales Sunray Sales is offline
 

Senior Member
  
Join Date: Dec 2010
Posts: 194
 

Default 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.
__________________
4.4.2
www.sunraysales.com
HandsOnWebHosting
Reply With Quote
  #4  
Old 12-27-2010, 07:15 AM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: Displaying product images only when user logged In

You can use webmaster mode to determine the exact template.
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote
  #5  
Old 12-27-2010, 07:39 AM
 
thygtd thygtd is offline
 

Advanced Member
  
Join Date: Dec 2010
Posts: 31
 

Default 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.
__________________
X-Cart/LiteCommerce version v4.4.1
Reply With Quote
  #6  
Old 12-27-2010, 10:49 AM
 
Sunray Sales Sunray Sales is offline
 

Senior Member
  
Join Date: Dec 2010
Posts: 194
 

Default 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.
__________________
4.4.2
www.sunraysales.com
HandsOnWebHosting
Reply With Quote
  #7  
Old 12-28-2010, 09:17 AM
 
thygtd thygtd is offline
 

Advanced Member
  
Join Date: Dec 2010
Posts: 31
 

Default 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 ?
__________________
X-Cart/LiteCommerce version v4.4.1
Reply With Quote
  #8  
Old 12-28-2010, 01:15 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,197
 

Default 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
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #9  
Old 12-29-2010, 06:30 AM
 
thygtd thygtd is offline
 

Advanced Member
  
Join Date: Dec 2010
Posts: 31
 

Thumbs up 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!
__________________
X-Cart/LiteCommerce version v4.4.1
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


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

   

 
X-Cart forums © 2001-2020