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)

balinor 01-19-2009 01:57 PM

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}>

iWD 01-20-2009 05:24 AM

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?

carpeperdiem 01-20-2009 05:30 AM

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...

iWD 01-20-2009 05:55 AM

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 01-22-2009 05:59 AM

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!

Psychobilly 01-23-2009 10:53 AM

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

Momtreprenuer 06-29-2009 07:45 PM

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

carpeperdiem 06-30-2009 02:35 AM

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.

Momtreprenuer 06-30-2009 09:18 AM

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??

pairodimes 07-15-2009 01:03 PM

Re: common if/then modifications I make to x-cart...
 
Love this post - thanks


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

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