Hi,
I am tring to figure out how to change the color of the font. I have a shopping cart page that is showing the fot as white and I need it to be red. Can anyone out there help me? I have looked all over and can not get anywhere with this.
I also am trying to figure out how to program in PHP that when my inventory is gone the item is no longer available. I was given the code below to use to figure out how much was availible but I don't know how to program it to count down the inventory till it is all gone. Can anyone help me with that too? I have the partial code listed below.
$unit = article_get_field('stock');
if(article_get_field('stock') < article_get_field('count')){
article_set_field('HIDE_ORDERBUTTON', TRUE);
article_set_field('hint', 'Unfortunately at this time, the amount available is only '.$unit.' please select an amount equal to or less than '.$unit.'');
} else {
article_set_field('HIDE_ORDERBUTTON', FALSE);
article_set_field('hint', '');
}
Thank you very much
Desperately need PHP help Please
Moderators: Website/Forum Admins, Other/Off Topic Moderators
-
- Posts: 1
- Joined: Mon Feb 23, 2004 1:03 am
the simple way to change color is <font color=red>red text</font>
you can be fancier by using style sheets, but i'll leave that to web tutorials to teach you that
assuming this code:
you can be fancier by using style sheets, but i'll leave that to web tutorials to teach you that
assuming this code:
is using pre-defined functions, you can do something like this:$unit = article_get_field('stock');
if(article_get_field('stock') < article_get_field('count')){
article_set_field('HIDE_ORDERBUTTON', TRUE);
article_set_field('hint', 'Unfortunately at this time, the amount available is only '.$unit.' please select an amount equal to or less than '.$unit.'');
} else {
article_set_field('HIDE_ORDERBUTTON', FALSE);
article_set_field('hint', '');
}
$unit = article_get_field('stock');
if(article_get_field('stock') < article_get_field('count')){
article_set_field('HIDE_ORDERBUTTON', TRUE);
article_set_field('hint', 'Unfortunately at this time, the amount available is only '.$unit.' please select an amount equal to or less than '.$unit.'');
} elseif( article_get_field('stock') == 0 ) {
article_set_field('HIDE_ORDERBUTTON', TRUE);
article_set_field('hint', 'We are out of this item at this time.');
} else {
article_set_field('HIDE_ORDERBUTTON', FALSE);
article_set_field('hint', '');
}
In God we trust,
Everyone else must have an X.509 certificate.
Everyone else must have an X.509 certificate.
Who is online
Users browsing this forum: No registered users and 2 guests