| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Order information from DB to Smarty var? | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() Hi,
I'm curious to why I can't seem to have a working if statement while calling {if $order.fedex_tracking ne ""} or {if empty($order.fedex_tracking)}.. do I have to do anything on the PHP side of things in order for this to show? (I'm working with the order message template) Thanks! Tom.
__________________
Quote:
|
|||||||
#2
|
|||||||||
|
|||||||||
![]() is fedex_tracking available in the $order array?
webmaster mode might help, or try printing $order.fedex_tracking somewhere so you can see what value is has, I find this helps when trying to work out why ifs don't work. sometimes the variable value isn't what you expect. hth
__________________
X-Cart version 5 (Previously 3.5-4) Previous Versions included BCSE Reward Points Mod Altered Cart On Sale Mod Wordpress Plugin Please don't PM me for support. I help where I can on the forum and your question will more likely be answered there. Shout me a Coffee! |
|||||||||
#3
|
|||||||
|
|||||||
![]() Sorry, I had a lack of understanding of how that worked... It's actually a custom field that our programmers put in that I need to evaluate. So, it needs to be defined in an array?
__________________
Quote:
|
|||||||
#4
|
|||||||||
|
|||||||||
![]() OK, so you've added it to the database yourself.
However, the php doesn't know that field exists, so it's not returned when the database is queried. In general queries specify exactly which data is needed to keep the size down and the page load quicker. Your php files will need editing to include this data in the query. hth
__________________
X-Cart version 5 (Previously 3.5-4) Previous Versions included BCSE Reward Points Mod Altered Cart On Sale Mod Wordpress Plugin Please don't PM me for support. I help where I can on the forum and your question will more likely be answered there. Shout me a Coffee! |
|||||||||
#5
|
|||||||
|
|||||||
![]() Does it matter where I query the database from or is there a function that does it that can be modified? In earlier instances of the code that I'm modifying has the same if statement and it used to work at one time, but I'm guessing someone modified the query and broke the if statement? Hence the reason it doesn't work anymore? Now I've been told to change it and still am young in my PHP and Smarty days - but eager to learn.
![]()
__________________
Quote:
|
|||||||
|
|||
X-Cart forums © 2001-2020
|