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
  #131  
Old 12-13-2011, 11:25 AM
  Yalokin's Avatar 
Yalokin Yalokin is offline
 

Advanced Member
  
Join Date: Sep 2009
Location: New York USA
Posts: 75
 

Default Load Script and Images on ONE Page

Hello I need to load scripts and images only if user on one page and I can not specify page Id because it custom made module and all categories shown there as:

custom.php?cat=7000 or custom.php?cat=3450 and so on

Load script only on all of the module.php page with cat ID from 1 to 10000.

or simply custom.php page


thank you.
__________________
Reply With Quote
  #132  
Old 12-20-2011, 09:36 AM
  Yalokin's Avatar 
Yalokin Yalokin is offline
 

Advanced Member
  
Join Date: Sep 2009
Location: New York USA
Posts: 75
 

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

Hello did you figure this out.

I try to do the same but with more scripts and css.

Also how to define page in if/else if it custom.php for example.


thank you



Quote:
Originally Posted by anandat
I want if else statement for static page.
For example if visitor click on static page link. The following javascript should be load

Code:
<head> <script language="Javascript" src="http://gd.geobytes.com/Gd?after=-1"></script> <script language="javascript"> if(typeof(sGeobytesLocationCode)!="undefined"&&sGeobytesLocationCode.indexOf('US')==0) { document.write("<META HTTP-EQUIV='Refresh' CONTENT='0; URL=http://www.SomeDomain.com'>"); } </script> </head>

In short what if/else condition I should put between <head> </head> so that above javascript function load if person open static page id=1 ?
__________________
Reply With Quote
  #133  
Old 02-15-2012, 06:28 PM
 
obac01 obac01 is offline
 

Newbie
  
Join Date: Aug 2004
Posts: 4
 

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

Hi I customized the Fulfilment account to be able to add products, works great, now my client wants to hide some options from the add/edit product page, I would like the help of you guys to let me know an If/then statment to hide the options to the fulfilment staff. I have almost 3 days working on it and I cann't find the varieble to do this.

Thanks
__________________
OB01
x-cart gold 4.4.1 | ferreteriamonterroso.com
Reply With Quote
  #134  
Old 02-18-2012, 11:28 PM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

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

Hi OBO1,
I haven't tried this bu I know that include/security.php assigns the user account flag to smarty:
$smarty->assign('current_membership_flag', $user_account['flag']);
and fulfillment staff's flag is FS I believe.

So maybe:
{if $current_membership_flag ne "FS"}
Show this stuff to regular admins.
{elseif $current_membership_flag eq "FS"}
Show this stuff only to Fulfillment Staff.
{/if}
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote
  #135  
Old 02-21-2012, 12:10 PM
 
obac01 obac01 is offline
 

Newbie
  
Join Date: Aug 2004
Posts: 4
 

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

Quote:
Originally Posted by totaltec
Hi OBO1,
I haven't tried this bu I know that include/security.php assigns the user account flag to smarty:
$smarty->assign('current_membership_flag', $user_account['flag']);
and fulfillment staff's flag is FS I believe.

So maybe:
{if $current_membership_flag ne "FS"}
Show this stuff to regular admins.
{elseif $current_membership_flag eq "FS"}
Show this stuff only to Fulfillment Staff.
{/if}


Thank you Totaltec!! works Great!.
__________________
OB01
x-cart gold 4.4.1 | ferreteriamonterroso.com
Reply With Quote
  #136  
Old 05-31-2012, 12:26 PM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

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

Quote:
Originally Posted by PhilJ
Code:
{if $smarty.get.pageid eq "1"} ... {/if}

Better to use this code in case they are using CDSEO or clean urls which won't have the pageid in the url:

Code:
{if $page_data.pageid eq 'X'} I am on page X. {/if}
Reply With Quote
  #137  
Old 09-07-2012, 06:07 PM
 
pauline pauline is offline
 

Member
  
Join Date: Mar 2005
Location: UK
Posts: 29
 

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

Hi, could anyone please point me in the right direction, I'm trying to hide the add to cart, update, price and amount for products in just one category in the wishlist using if/else statement. I think I should be editing wl_products.tpl, would anyone know if this is correct.

Thank you,
Pauline.
__________________
X-Cart Pro v4.4.4, XMall
Reply With Quote
  #138  
Old 09-08-2012, 06:51 PM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

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

Pauline, use webmaster mode to determine what template to edit. Follow the tutorial link in my signature if you don't know what I mean.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote
  #139  
Old 09-09-2012, 09:03 AM
 
pauline pauline is offline
 

Member
  
Join Date: Mar 2005
Location: UK
Posts: 29
 

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

Will Do,
thanks Mike.
__________________
X-Cart Pro v4.4.4, XMall
Reply With Quote
  #140  
Old 10-11-2012, 10:39 AM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

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

I added a list of some common statements I use in a tutorial at: X-Cart Common Smarty Statements.
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 06:25 AM.

   

 
X-Cart forums © 2001-2020