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
  #101  
Old 01-19-2009, 01:57 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

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

or around a class, like this:

<div {if $main ne "cart" AND $mode ne "checkout" AND $mode ne "order_message"}class="class1"{else}class="class2" {/if}>
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #102  
Old 01-20-2009, 05:24 AM
 
iWD iWD is offline
 

Advanced Member
  
Join Date: Jul 2008
Posts: 57
 

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

okay maybe "background" is the wrong terminology.
Or I'm putting it in the wrong place?

in the CSS it is table.container that I am adding the "background" image to.

What file would I put this code in?
the CSS?
the home.tpl?

And is that a "ne" not equals?
If so then is this code saying that if those menus are not there, then the image isn't?
'Cause that's right, I'm just making sure I understand it somewhat.

in any case I've done something wrong as it's not working.
Or the image is just not there in all accounts?
__________________
iWD
X-Cart: v4.1.10
PHP: 5.2.6
Host: Hands-on Web Hosting ( Linux )
MySQL: 4.1.22
Add ons: On Sale
2TC - JB AutoShip
Reply With Quote
  #103  
Old 01-20-2009, 05:30 AM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

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

Quote:
Originally Posted by iWD
I have been trying to get a if/then statement working and so far I'm at a loss.
I want to have an image for the background on the regular pages, but when you got the cart portion (where all your menus disappear) that it is just plain white (or that the image turns off).

How and where do I make the if then statement to make this work?

any help would be appreciated!
thanks!

Are you saying that you would LIKE your page to be different once you get to Fast Lane Checkout? If so, you should know that FLC has its own css file.

/skin1/modules/Fast_Lane_Checkout/skin1.css

This is where you could determine color or images of the container for FLC pages.

Not really an if/then issue...
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #104  
Old 01-20-2009, 05:55 AM
 
iWD iWD is offline
 

Advanced Member
  
Join Date: Jul 2008
Posts: 57
 

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

I don't believe it is the Fast Lane Check Out?
It has the image from my regular skin1.css file?
So I am assuming they are connected together?

But when you hit "buy now" (or other place it in the cart buttons) you move to your shopping cart.
At that point, and through the rest of the purchase I need the background (table.container) turned off because I am lacking in the menus that it is based on.
__________________
iWD
X-Cart: v4.1.10
PHP: 5.2.6
Host: Hands-on Web Hosting ( Linux )
MySQL: 4.1.22
Add ons: On Sale
2TC - JB AutoShip
Reply With Quote
  #105  
Old 01-22-2009, 05:59 AM
 
iWD iWD is offline
 

Advanced Member
  
Join Date: Jul 2008
Posts: 57
 

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

Okay, for those of you that are interested.
After much ado, here's what ended up happening for the change of the "table.container" from "cart pages" versus the "product pages" with an if/then statement.
This should be able to done with any changes you want to have done from the CSS to the "cart pages" versus the "product pages", but don't hold me to that, I'm new at this too!

First you will need two CSS files.
One for the Cart [skin1.css] and one for the Non-Cart [skin1_cart.css].

Then you need to make a copy of your customer/home.tpl (always save the original file, just incase this doesn't work with something else you've changed )

Then with the customer/home.tpl you need to find your CSS line.

Should look like this:
<link rel="stylesheet" type="text/css" href="{$SkinDir}/skin1.css" />

Then right after it you need to
{if $main eq "cart" AND $mode eq "checkout" AND $mode eq "order_message"}
<link rel="stylesheet" type="text/css" href="{$SkinDir}/skin1_cart.css />
{/if}


This worked for me, hope it helps someone out there too!
enjoy
and thanks for the help everyone who was involved!
great job!
__________________
iWD
X-Cart: v4.1.10
PHP: 5.2.6
Host: Hands-on Web Hosting ( Linux )
MySQL: 4.1.22
Add ons: On Sale
2TC - JB AutoShip
Reply With Quote
  #106  
Old 01-23-2009, 10:53 AM
 
Psychobilly Psychobilly is offline
 

Newbie
  
Join Date: Apr 2005
Posts: 9
 

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

I've gone through this thread (as well as others) and I'm unable to hide the "Market Place" price from wholesale customers. Seems like this should be default. Any help would be appreciated.

Thanks
__________________
X-Cart v4.1.11 (Unix)
Reply With Quote
  #107  
Old 06-29-2009, 07:45 PM
 
Momtreprenuer Momtreprenuer is offline
 

Member
  
Join Date: Jan 2008
Posts: 19
 

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

Ok, I'm a little frustrated. It seems like whenever I ask a question, there is very little or no response, yet I see other questions that get many, many responses. I guess I'm either asking a difficult question, posting in the wrong place, or ...well I have no idea.

I'm sure that there is some forbidden rule about double posting or whatever, but I really need help so I'm trying in another location. The original question is here: http://forum.x-cart.com/showthread.php?t=48337 but I am also asking here in hopes that there will be some response.

Here's my problem:

All of the "if" membership statements are great but what would I code for a subscription status? For example, I have 3 subscription types: A, B, and C. I have a static page that is for current subscribers only that needs to show different content based upon the type of subscriber.


Is there a way to tweak the following to be able to use it for subscription types instead of membership types:

{if $user_membership eq '1'}
Content for 1
{elseif $user_membership eq '2' or $user_membership eq '3'}
Content for 2 and 3
{else}
sorry, membership needed for access.
{/if}

I've tried every version of subscriptionid, subscription, productid etc. I've been going around and around with this for weeks trying to figure it out on my own. I know with all the pros here on this board, there's gotta be some easy resolution! I would even be willing to pay a reasonable fee. Please help if you can!!

Thanks in advance,
Momtrepreneur
X-cart Version 4.1.12
__________________
Version 4.1.12
Reply With Quote
  #108  
Old 06-30-2009, 02:35 AM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

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

Quote:
Originally Posted by Momtreprenuer
I've tried every version of subscriptionid, subscription, productid etc. I've been going around and around with this for weeks trying to figure it out on my own.

Here's a tip that will point you towards your goal:

http://forum.x-cart.com/showthread.php?t=12718

By using this technique, you can pinpoint the exact variable that is being called for the membership. And then your if/else will work.
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #109  
Old 06-30-2009, 09:18 AM
 
Momtreprenuer Momtreprenuer is offline
 

Member
  
Join Date: Jan 2008
Posts: 19
 

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

Thanks carpeperdiem for your reply. I tried that one already and while I was able to see lots of variables, I couldn't see any new ones that I hadn't already tried. I think that I may have the right variable but the wrong syntax (or whatever it is called) so it doesn't work.

Thank you so much for your effort in replying though. For an example of subscriptions 1, 2 here's what I've been playing around with:
Code:
{if subscription eq '1'} show me content for 1 {esleif subscription eq '2'} show me content for 2 {else} Sorry, you must have a sub to view this content. {/if}

I've tried using " or just '. I've tried subscriptions, subscriptionid, subsscription_pay_period_type, subscription_status, productid and many others. I've also taken direct code from subscription.tpl. I've also tried: {if subscription ne ""} which just shows the content to anyone logged in.

I know this should work. I may just need to add more code to another file maybe??
__________________
Version 4.1.12
Reply With Quote
  #110  
Old 07-15-2009, 01:03 PM
  pairodimes's Avatar 
pairodimes pairodimes is offline
 

Advanced Member
  
Join Date: Dec 2007
Posts: 50
 

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

Love this post - thanks
__________________
------
Brian

Portland web design / development
X-Cart 4.1.9 (a few carts)
X-Cart 4.2.0 (1 cart so far)
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 12:55 AM.

   

 
X-Cart forums © 2001-2020