When a customer creates a new address in SCA, the ...
# suitecommerce
n
When a customer creates a new address in SCA, the address comes over as the Default Shipping/Billing address. Is there any way to prevent that behavior? I was told no, by some previous developers.
p
Unfortunately, no. Those fields with any NS Webstore (SB and SCA work the same) become the fields to save what the user has selected in order to remember it next time they log in.
It's not when they create the address, but when they select the address on checkout, i believe.
n
seems like such a weird decision they made there
p
Yup they should just have 2 more fields for Webstore "last billing/last shipping" address.
n
i did a big work around where we have "KCD Default Billing" and "KCD Default Shipping" and a map/reduce job goes through and update the standard billing/shipping to match that
but it doesn't get checked correctly and there are many issues with that
p
I was about to write that.. there are workarounds. They are ugly.
And involve continously checking changes indeed and storing real defaults on custom fields.
just like you mentioned.
n
yeah its pretty bad
another issue with it is there isn't really a good way to prevent users from checking 2 of the custom default shipping/billing check boxes
we tried to do some customizations on the address forms but that caused a bunch of headaches
p
it would also help if Custom address fields, that are there since 2014 or 2015, would show up on the commerce api...but hey, that would be too convinient
c
@nzaleski I tried to accomplish this too awhile back. It's not easy or clean.
netsuite halo 1
a
There's an enhancement request for this as id.247774 https://nlcorp.app.netsuite.com/app/site/hosting/scriptlet.nl?script=847&deploy=1&custpage_ervotingcustsearch=247774 Although it's described as Reference Checkout, like PabloZ says it's all of NetSuite Ecommerce and it's been this way so long as I can remember. We should start voting on this enhancement, and bringing the enhancement request up every time it gets asked. @PabloZ @Chris @nzaleski
A customer just asked me about this again today. "It's not a bug... it's a feature" netsuite
n
Alright I have upvoted this enhancement. I was hoping there would be more than 1 vote 😂
g
A possible solution to this is to trigger a suitelet that resets the shipping every time it's changed in the backend. Also not pretty, but no need for a map reduce script to be running.
if (shipmethod) { ModelsInit.order.*setShippingMethod*({ shipmethod: shipmethod.internalid, shipcarrier: shipmethod.shipcarrier }); } else { ModelsInit.order.*removeShippingMethod*(); } //Reset shipping suitelet var context = *nlapiGetContext*(); var customer = context.*getUser*(); *nlapiRequestURL*("https://suiteleturl....?customer="+customer,null,null,null,"GET");