| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Adding membership type to order invoices | ||||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Adding membership type to order invoices
Hi, I am working on my 4.6.0 store and trying to add a line to order_invoice.tpl to show if an order is "wholesale" or "retail". I tried adding the same lines I did in my 4.4.5 store which work great but they don't seem to be working in my 4.6.0 store, or if it does, it is sporadic. Here is what I have...
/common_files/mail/html/order_invoice.tpl Code:
and in /ideal_responsive/mail/html/order_invoice.tpl Code:
I am thinking of changing Code:
to Code:
and see if that works but I have my doubts. I have also tried double quotes instead of single quotes around Wholesale but that didn't seem to work either. Am I missing something? I just logged in and placed an order and it said WHOLESALE but last night I got one that was wholesale and it said RETAIL even though the prices were wholesale.
__________________
www.uscandleco.com - X-Cart Version 4.7.11 Gold Plus php7.3 mods: reCaptcha running on UNIX www.keystonecandle.com X-Cart Gold Plus - Version 4.7.11 php7.2 mods: reCaptcha cdseo pro running on UNIX |
|||||||
#2
|
|||||||
|
|||||||
Re: Adding membership type to order invoices
I really need a fix for this issue. Can anyone help figure out what is going on? The changes I made work fine as long as a customer is not paying with a credit card (not sure about paypal yet). If I place an order and use "phone order" or "purchase order" as the payment method the invoice will show "Wholesale" as the membership level but with credit card it stays as "Retail". I am using Authorize.Net DPM and am not sure if that is causing the problem or not.
The goal is to just have the emailed invoice state whether the order was placed was a retail or wholesale order.
__________________
www.uscandleco.com - X-Cart Version 4.7.11 Gold Plus php7.3 mods: reCaptcha running on UNIX www.keystonecandle.com X-Cart Gold Plus - Version 4.7.11 php7.2 mods: reCaptcha cdseo pro running on UNIX |
|||||||
#3
|
|||||||
|
|||||||
Re: Adding membership type to order invoices
Are you sure $userinfo.membership is passed on to the page interpreting the TPL in every situation? because if not, it will always use the ELSE.
You could check it by making it something like: Code:
You could also echo the $userinfo.membership to see what's in the variable itself.
__________________
X-Cart 4.7.12 |
|||||||
#4
|
|||||||
|
|||||||
Re: Adding membership type to order invoices
Thanks herber,
I'll give that a shot to see if it works. I guess I expected my code to work because it works perfectly on my 4.4.5 site but I'm not using DPM to accept credit cards on that site though so I thought that could be the issue. I'll post back when I know how it works out.
__________________
www.uscandleco.com - X-Cart Version 4.7.11 Gold Plus php7.3 mods: reCaptcha running on UNIX www.keystonecandle.com X-Cart Gold Plus - Version 4.7.11 php7.2 mods: reCaptcha cdseo pro running on UNIX |
|||||||
#5
|
|||||||
|
|||||||
Re: Adding membership type to order invoices
After looking over your suggested code again, i noticed that you have
Code:
I don't actually have a membership called Retail so that line will not ever actually work. Any customer not logged in as a wholesale account would get the No Membership in that case, correct? I think I will also add the echo line too to see what is in there if anything like you suggested. would I add that line like this in the spot I want it? echo {$userinfo.membership}
__________________
www.uscandleco.com - X-Cart Version 4.7.11 Gold Plus php7.3 mods: reCaptcha running on UNIX www.keystonecandle.com X-Cart Gold Plus - Version 4.7.11 php7.2 mods: reCaptcha cdseo pro running on UNIX |
|||||||
#6
|
|||||||
|
|||||||
Re: Adding membership type to order invoices
Quote:
I have no clue how this template system works so I don't know how to just echo the variable, I imagine it would perhaps be something like Code:
(based on this) So try this: Code:
Code:
__________________
X-Cart 4.7.12 |
|||||||
#7
|
|||||||
|
|||||||
Re: Adding membership type to order invoices
Nice, I'll give that shot and see what happens.
__________________
www.uscandleco.com - X-Cart Version 4.7.11 Gold Plus php7.3 mods: reCaptcha running on UNIX www.keystonecandle.com X-Cart Gold Plus - Version 4.7.11 php7.2 mods: reCaptcha cdseo pro running on UNIX |
|||||||
#8
|
|||||||
|
|||||||
Re: Adding membership type to order invoices
So when I changed my code to this
Code:
When customers place their orders the field is blank and when I placed an order as a wholesale customer it was also blank. Any ideas how to make this work? I just need a way to identify if an order was placed by a wholesale account or not.
__________________
www.uscandleco.com - X-Cart Version 4.7.11 Gold Plus php7.3 mods: reCaptcha running on UNIX www.keystonecandle.com X-Cart Gold Plus - Version 4.7.11 php7.2 mods: reCaptcha cdseo pro running on UNIX |
|||||||
#9
|
|||||||
|
|||||||
Re: Adding membership type to order invoices
Just wondering if I am being confusing as to what I'm try to do or if it is really this difficult? I can't imagine I'm the only person who needs this feature.
__________________
www.uscandleco.com - X-Cart Version 4.7.11 Gold Plus php7.3 mods: reCaptcha running on UNIX www.keystonecandle.com X-Cart Gold Plus - Version 4.7.11 php7.2 mods: reCaptcha cdseo pro running on UNIX |
|||||||
#10
|
|||||||
|
|||||||
Re: Adding membership type to order invoices
Sorry, if that doesn't work then you'll need someone who can work with the template engine.
I can write it in PHP but I haven't got a clue how the template engine interprets it.
__________________
X-Cart 4.7.12 |
|||||||
|
|||
X-Cart forums © 2001-2020
|