Author Topic: CustomerCode Error when Submitting order  (Read 826 times)

nickwiebe

  • Jr. Member
  • **
  • Posts: 61
CustomerCode Error when Submitting order
« on: August 15, 2014, 23:03:23 pm »
A customer is trying to submit an order and they are getting this error

AvaTax Error CustomerCode length must be between 1 and 50 characters.

I use AvaTax for tax calculations and when VirtueMart sends an order through AvaTax it automatically creates a customer code based on this formula if the customer chooses not to register:

nonreg_firstnameLastnameEmail@email.com

Is there a way to change the settings in VirtueMart so it doesn't use the first name, last name and email address for this customer code but rather just the email address?  If I can't do it in the settings, can you tell me what file and where in the code to change this?  AvaTax only allows up to 50 characters for the CustomerCode.

HELP PLEASE

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 8890
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.4.2
Re: CustomerCode Error when Submitting order
« Reply #1 on: August 16, 2014, 20:48:07 pm »
had exactly the same problem with my http://forum.virtuemart.net/index.php?topic=113564.msg381938#msg381938

the string is core VM so I just shortened it in the taxcloud plugin

e.g.  $customernumber = substr($cart->customer_number,0,32); //shorten cust id to 32 for guest checkout

so for Alva I assume around line 466 in alavara.php

$vmadd['customer_number'] = substr($cart->customer_number,0,50);

make sure the plug doesn't recheck this on the return
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

OrangeYouGlad?

  • 3rd party VirtueMart Developer
  • Beginner
  • *
  • Posts: 6
    • Avalara
Re: CustomerCode Error when Submitting order
« Reply #2 on: October 28, 2014, 22:10:10 pm »
Thanks for the assist @GJC Web Design


Nickwiebe are you still experiencing this error?
John Offergeld
206-826-4900 x1122