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

common if/then modifications I make to x-cart...

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #111  
Old 10-05-2009, 07:07 PM
 
CooperDooper CooperDooper is offline
 

Member
  
Join Date: Aug 2009
Posts: 12
 

Default Re: common if/then modifications I make to x-cart...

Hello all,

This is a great thread, lots of good info.

However, I can't seem to get #9 to work, we would like one of our static pages (support.html) to only be accessible to those with a membership (after we manually confirm their membership in the User Profiles section).

We have two types of memberships, Returning Customers and Distributors. We would like both types of memberships to have access to the Support page once they are logged in.

I believe a lot of the solutions posted here are the pre 4.2 versions and thats why the solutions in this thread are proving unsuccessful. Were running 4.2.2.

This should be a simple if statement however we're useless with x-cart

We would greatly appreciate your help! Cheers,
__________________
x-cart 4.2.2
*****************
x-fancycat-4.2.2
x-aom-4.2.2
Reply With Quote
  #112  
Old 04-30-2010, 09:35 AM
  FTI's Avatar 
FTI FTI is offline
 

Senior Member
  
Join Date: Oct 2009
Location: Plovdiv, Bulgaria
Posts: 153
 

Default Re: common if/then modifications I make to x-cart...

Hi there, great thread. I'm have a problem with the flyout menus in v4.3.1. My customer wants the following thing and I believe it can happen with it/then modification. She wants when a client is on a particular category of the menu, all other categories and subcategories to dissapper. For example, the ones in the green are visible, the ones in red are not visible:

Category 1
Subcategory 1
Subcategory 2


Category 2
Subcategory 1
Subcategory 2

Category 3
Category 4


Any ideas, I've been trying to do this for 4 days already and I'm puzzled... Thanks in advance!
__________________
Version 4.2.3
X-Cart Gold

Version 4.3.1
X-Cart Gold
Reply With Quote
  #113  
Old 09-23-2010, 10:00 AM
 
fioppy fioppy is offline
 

Member
  
Join Date: Aug 2010
Posts: 13
 

Default Re: common if/then modifications I make to x-cart...

I'm applying IF statement condition on language variable I have added to two language on my website."

I had set store_language as variable and it's value in english website as EN and in arabic as AR.

I have now the below condition should be applied true when the website is in English but it never comes true, it switches always to ELSE condition.

Please this is me only ask to be solved, help in this

HTML Code:
{if $lng.store_language eq "EN"} <div style="text-align:center;width:250px;"><a href="javascript:void(window.open('http://manalifashion.com/Livezilla/chat.php','','width=590,height=580,left=0,top=0,resizable=yes,menubar=no,location=no,status=yes,scrollbars=yes'))"><img src="http://manalifashion.com/Livezilla/image.php?id=01" width="250" height="100" border="0" alt="LiveZilla Live Help"></a><noscript><div><a href="http://manalifashion.com/Livezilla/chat.php" target="_blank">Start Live Help Chat</a></div></noscript><div style="margin-top:2px;"><a href="http://www.livezilla.net" target="_blank" title="LiveZilla Live Help" style="font-size:10px;color:#bfbfbf;text-decoration:none;font-family:verdana,arial,tahoma;">LiveZilla Live Help</a></div></div><!-- http://www.LiveZilla.net Chat Button Link Code --><!-- http://www.LiveZilla.net Tracking Code --><div id="livezilla_tracking" style="display:none"></div><script type="text/javascript"> <!-- DONT PLACE IN HEAD ELEMENT --> var script = document.createElement("script");script.type="text/javascript";var src = "http://manalifashion.com/Livezilla/server.php?request=track&output=jcrpt&nse="+Math.random();setTimeout("script.src=src;document.getElementById('livezilla_tracking').appendChild(script)",1);</script><!-- http://www.LiveZilla.net Tracking Code --> {else} {$lng.store_language} {/if}
__________________
X-Cart 4.4
Reply With Quote
  #114  
Old 09-23-2010, 10:13 AM
 
Italian Glassman Italian Glassman is offline
 

Advanced Member
  
Join Date: Sep 2007
Posts: 92
 

Default Re: common if/then modifications I make to x-cart...

Fioppy,

This is the code I use. Hope it helps.

{if $shop_language eq"EN"}
Insert Condition #1 here
{else}
Insert Condition #2 here
{/if}
__________________
X-Cart version 4.1.8
(given up, for now, on 4.1.9 upgrade)
Reply With Quote
  #115  
Old 01-08-2011, 09:05 PM
 
fioppy fioppy is offline
 

Member
  
Join Date: Aug 2010
Posts: 13
 

Default Re: common if/then modifications I make to x-cart...

I need to custiomized the product options to serve a special task in my website.

I want to create a Drop down list which is normal and available now on website for ex:
Size1,2,3,4,5, Customize)

I will create different Text options too like: Hips, Arm, Waist, Bust as test field to options products.

If customer selected "customize" from drop down list dynamicaly the Test fields above should be displayed below it. or then they should be hidden all time unless customer picked Customize from Size drop down list.

Please advice what change required to reach this option

Regards
__________________
X-Cart 4.4
Reply With Quote
  #116  
Old 02-14-2011, 08:18 PM
 
Omron Khan Omron Khan is offline
 

Member
  
Join Date: Jan 2011
Posts: 14
 

Default Re: common if/then modifications I make to x-cart...

Guys i wnat to display a image only in the login page. any idea how to write a if condition for this?
__________________
x-cart-4.4.1-pro
Reply With Quote
  #117  
Old 03-03-2011, 04:37 PM
 
masada3336 masada3336 is offline
 

Senior Member
  
Join Date: Jan 2009
Posts: 115
 

Default Re: common if/then modifications I make to x-cart...

Hi Instinctual,
Is there an if statement to have something show on every category BUT one specific one? I tried using
{if cat eq "254"}
nothing goes here - empty

{else}

the regular code would go here

{/if}

but it didn't seem to affect products_t.tpl

Basically, I have only one category where I want to omit the "buy now" button - the rest it's good to go on.

Thanks!
__________________
4.4.5 - with Customized Smart Template
Reply With Quote
  #118  
Old 03-03-2011, 07:33 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,197
 

Default Re: common if/then modifications I make to x-cart...

You can use $current_category.categoryid
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #119  
Old 03-03-2011, 08:30 PM
 
masada3336 masada3336 is offline
 

Senior Member
  
Join Date: Jan 2009
Posts: 115
 

Default Re: common if/then modifications I make to x-cart...

Quote:
Originally Posted by cflsystems
You can use $current_category.categoryid
Hmm...ok - how can I use that if to omit the buy_now button and will it be *only* on the category page (not on the product pages?)
Thanks! I'm totally clueless here with the programming statements
__________________
4.4.5 - with Customized Smart Template
Reply With Quote
  #120  
Old 03-04-2011, 03:20 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,197
 

Default Re: common if/then modifications I make to x-cart...

Buy Now button is only on products list pages, not on product pages. You need to place the if statement in the correct template - products_t.tpl or products_list.tpl - depending on how your categories pages are listed
__________________
Steve Stoyanov
CFLSystems.com
Web Development
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 03:03 PM.

   

 
X-Cart forums © 2001-2020