| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
If, elseif, else... suggestion please? | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
If, elseif, else... suggestion please?
Hi, somehow i got confused half way thru the codes...
here is what i wanted it to work (include/history_order.php) Code:
This is the area i stuffed up: if ($mode == "invoice") { if ($current_area == "A" || ($current_area == "P" && !empty($active_modules["Simple_Mode"]))) $smarty->assign("show_order_details", "Y"); func_display("main/order_invoice_print.tpl",$smarty); } elseif ($mode == "invoice_no_cc") ($current_area == "A" || ($current_area == "P" && !empty($active_modules["Simple_Mode"]))) $smarty->assign("show_order_details", "Y"); func_display("main/order_invoice_no_cc_print.tpl",$smarty); } elseif ($mode == "label") func_display("main/order_labels_print.tpl",$smarty); I can't make it works... right now my code is only this: Code:
Any idea please?
__________________
X-Cart version 4.x (Most likely will be the latest version) |
|||||||
#2
|
|||||||||
|
|||||||||
post what you want it to do and ill see whats what
__________________
Looking for a reliable X-cart host ? You wont go wrong with either of these. EWD Hosting Hands On Hosting |
|||||||||
#3
|
|||||||
|
|||||||
Thanks...
Hi sorry for confused message at the top..
what i tried to do is... in order > click on the ID to go to the details > there is a "print invoice" button. I actually made 2 print invoice buttons there. One with CC and one without CC in it. So... i then cut the 'label' section out for now as i can't make it 3 statements like eg. if not A go B if not B go C etc. i stucked with 2 statement (if not A go B if not B toughluck.... ) Here the current file (include/history_order.php): Code:
The original file is: Code:
The different between the two are: - added Code:
Code:
Can someone tell me how to put these 3 statements together? Code:
__________________
X-Cart version 4.x (Most likely will be the latest version) |
|||||||
#4
|
|||||||||
|
|||||||||
ive done something similar in the past but like this
create an extra button to print your invoice and add an extra var ie - orders.php?orderid=blah&showcc=Y then on the invoice wrap the cc code part in this Code:
this is a very basic example and the button code is made up but should give you an idea of how to achieve it
__________________
Looking for a reliable X-cart host ? You wont go wrong with either of these. EWD Hosting Hands On Hosting |
|||||||||
#5
|
|||||||
|
|||||||
Thanks
Thanks Heaps Shan,
As the code for both invoice and no invoice's buttons are already in place and functioning.. Can i use the code i put in earlier but with the label? I am not expert with php yet so i dont't know how to add the -var you was talking about. Thank you for your idea tho. Once this mod done i will post the complete 'how to' for people to use them
__________________
X-Cart version 4.x (Most likely will be the latest version) |
|||||||
#6
|
|||||||||
|
|||||||||
you can even wrap the cc code in smarty that checks to see if the user is an admin user rather then a customer and show it that way
__________________
Looking for a reliable X-cart host ? You wont go wrong with either of these. EWD Hosting Hands On Hosting |
|||||||||
|
|||
X-Cart forums © 2001-2020
|