Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Adding membership type to order invoices

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #11  
Old 02-21-2014, 05:56 AM
 
keystone keystone is online now
 

X-Adept
  
Join Date: Jul 2006
Location: USA
Posts: 748
 

Default Re: Adding membership type to order invoices

Hi Herber,
I appreciate your effort in trying to help me out.

I'm wondering if the issue lies with the fact I have the Authorize.Net DPM mod on this site. The code works perfectly on my 4.4.5 store but NOT on this 4.6.0 store with the DPM mod.
__________________
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
Reply With Quote
  #12  
Old 02-21-2014, 09:54 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,030
 

Default Re: Adding membership type to order invoices

You are probably trying to use something that doesn't exist in the userinfo array.

Try to echo the whole array so you can see all the info in there. Something like this in the invoice template should work (if the array with the customer info is $userinfo)

{foreach from=$userinfo item=user key=k}
{$k}: {$user}<br/>
{/foreach}

This should give you clue what the variable that hold membership is and how to call it, if it exists in this array
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #13  
Old 02-21-2014, 11:05 AM
 
keystone keystone is online now
 

X-Adept
  
Join Date: Jul 2006
Location: USA
Posts: 748
 

Default Re: Adding membership type to order invoices

Hi Steve,
I pasted your code in the template but don't get any output.

Here is some code that is already in there to pull the customers first name...

Code:
{if $_userinfo.default_fields.firstname}

The thing is, if I log in as a WHOLESALE account and keep my initial code (post #1)
Quote:
<strong>Membership:</strong> {if $userinfo.membership eq 'Wholesale'}Wholesale
{else}Retail
{/if}
in the template I get Membership: Wholesale to output on the invoice as long as I use Phone Order or Purchase Order as the payment method. Even works when I pay with Paypal. As soon as I use Credit Card (Authorize.net DPM mod) as the payment method, it doesn't work any more.
__________________
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
Reply With Quote
  #14  
Old 02-21-2014, 02:16 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,030
 

Default Re: Adding membership type to order invoices

Then the userinfo array is not called $userinfo, you need to use the proper name. In your example above us
$_userinfo - underscore
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #15  
Old 02-21-2014, 02:56 PM
 
keystone keystone is online now
 

X-Adept
  
Join Date: Jul 2006
Location: USA
Posts: 748
 

Default Re: Adding membership type to order invoices

Hi Steve,
I got it to work. I had tried using the $_userinfo but it didn't work. Realized I needed to change the
Code:
{/if}
to
Code:
{/foreach}
in the snippet you suggested. Here is what it output...
It shows both membership: Wholesale and membershipid: 2 so shouldn't it out put that? I guess it would if I adjusted my original code to have the UNDERSCORE...

And yes that seems to have taken care of it.

Still doesn't explain why it worked with the wrong code before for different payment methods...

Thanks a ton for the help in trouble shooting this guys.
__________________
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
Reply With Quote
  #16  
Old 02-22-2014, 12:51 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,030
 

Default Re: Adding membership type to order invoices

ops sorry... I corrected my post...
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #17  
Old 01-19-2020, 05:52 PM
 
siddharth.puri@wheelandba siddharth.puri@wheelandba is offline
 

Advanced Member
  
Join Date: Nov 2019
Posts: 66
 

Default Re: Adding membership type to order invoices

Hi Can you please suggest a solution for xcart 5 as to how can I display the membership in the invoice?

Thanks and Regards,
Siddharth Puri
__________________
Version 5.3.6.6
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 10:57 PM.

   

 
X-Cart forums © 2001-2020