[SOLVED] tax not applying on registration - resolved

1 year 5 months ago - 1 year 5 months ago #331544 by bizguy
My issue is when a new member registers, the tax is not calculated on their invoice (basket?) total.

I have an AutoAction that is triggered onAfterSaveUserRegistration and if I look in the comprofiler table after the basket is displayed, I see that the correct state is saved into cb_state and cb_subs_inv_address_state (via the AutoAction) however, the Billing Address block does not display a State.

If I select Edit Billing Address, there is no state selected. Selecting a state updates cb_subs_inv_address_state to the selected state in the comprofiler table and calculates the correct tax.

Please advise.
Attachments:

Please Log in to join the conversation.

1 year 5 months ago #331551 by krileon
Replied by krileon on topic tax not applying on registration
The field you're mapping to cb_subs_inv_address_state is not mapping a value CBSubs expects. cb_subs_inv_address_state is stored as COUNTRY_ISO-STATE_ISO. So for example for California USA it's stored as US-CA.

Do you need to ask for this information during registration? If it's only purpose is to push that information to CBSubs my recommendation is reduce the friction on your registration page and remove those fields then they can complete them when needed in their basket.

The alternative is you'll need to be sure the information you're passing to CBSubs is values it expects. Easiest way to do that is to use CBSubs own database tables combined with CB Query Field to provide dropdown selects of the values CBSubs expects. The below topic does exactly that using CB Query Field and its Query Select field type combined with CB Core Fields Ajax and its Update On behavior.

www.joomlapolis.com/forum/developer-members-support/240757-query-drop-down-single-select-displaying-value-not-label-after-update?start=6#311513


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: bizguy

Please Log in to join the conversation.

1 year 5 months ago #331555 by bizguy
Replied by bizguy on topic tax not applying on registration
Yes, I have modified everything so the ISO country state codes are stored correctly (CA-ON for Ontario) and that is what is stored in the comprofiler table. That is also what Edit Billing Address stores in the comprofiler table. I can change the province in Edit Billing Address and the correct info is stored in the comprofiler table, and the correct tax is applied based on the rules, but not during the registration process.
 

Please Log in to join the conversation.

1 year 5 months ago #331561 by bizguy
Replied by bizguy on topic tax not applying on registration
I was generating the State code through the AutoAction and was concerned that the AutoAction may not trigger soon enough so the iso-state was populated when the basket was displayed. I changed the form and made the State field required, removing the AutoAction to populate it, which solved the issue. 

Thanks for your suggestions.
The following user(s) said Thank You: krileon

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.166 seconds

Facebook Twitter LinkedIn