Hi ppl,
I have a problem on a condition to echo my text on Category
If I use "my text" condition, it crashes...
<?php
if ($product->product_availability == my text ) {
echo JText::_('MYTEXT').$sep ;
}
?>
However, the "my text" works fine on product detail view.
But, instead of using "my text" if I use "100", it works fine!
<?php
if ($product->product_availability == 100 ) {
echo JText::_('MYTEXT').$sep ;
}
?>
I already try a few ways, but so far, got no luck!
Thanks in advanced
<?php
if ($product->product_availability == my text ) {
echo JText::_('MYTEXT').$sep ;
}
?>
What is :
my text
Syntax error, This will brake any language.
Are you looking to check for for $my_text ? or "my text" ? or ???
Jörgen
Used the word "my text", but the word I want to use is "on stock"
I already try it with just "stock"
It doesn't crashes, but also doesn't work properly
only echo MYTEXT tag language, and not the description under that tag
<?php
$mytext = JText::_('MYTEXT');
if ($product->product_availability == $mytext ) {
echo JText::_('MYTEXT').$sep ;
}
?>
Thank you GJC Web Design
Now it rocks! 8)