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)
-   -   common if/then modifications I make to x-cart... (https://forum.x-cart.com/showthread.php?t=8881)

CooperDooper 10-05-2009 07:07 PM

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,

FTI 04-30-2010 09:35 AM

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!

fioppy 09-23-2010 10:00 AM

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}


Italian Glassman 09-23-2010 10:13 AM

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}

fioppy 01-08-2011 09:05 PM

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:
Size:(1,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

Omron Khan 02-14-2011 08:18 PM

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?

masada3336 03-03-2011 04:37 PM

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!

cflsystems 03-03-2011 07:33 PM

Re: common if/then modifications I make to x-cart...
 
You can use $current_category.categoryid

masada3336 03-03-2011 08:30 PM

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

cflsystems 03-04-2011 03:20 AM

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


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

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