Found something I'm unsure about, if it's something I should fix in the shipping module, or if it's a core bug.
I'm doing a shipping module with several shipping selections (quotes), where some is restricted to company addresses, and thus I have something like this in the catalog model code to only display it when company name is filled:
But when I'm on the Checkout/Address page and remove the check-mark on "My billing and delivery addresses are the same." I get "Undefined index: company" - so to me it seems like Arastta is "loosing" some data when doing this. Also if I change the address from dropdown after removing the check-mark , all becomes fine again.
Any inputs are welcome.
I'm doing a shipping module with several shipping selections (quotes), where some is restricted to company addresses, and thus I have something like this in the catalog model code to only display it when company name is filled:
if (!$address['company'] && $product->ProductId == 'COMPANY_PRODUCT') {
continue;
}
But when I'm on the Checkout/Address page and remove the check-mark on "My billing and delivery addresses are the same." I get "Undefined index: company" - so to me it seems like Arastta is "loosing" some data when doing this. Also if I change the address from dropdown after removing the check-mark , all becomes fine again.
Any inputs are welcome.

In General
Share this post:
Responses (3)
-
Accepted Answer
Probably not the most elegant way, but for now I use something like (actually more products etc, thus I found this easiest):
if ($product->ProductId == 'COMPANY_PRODUCT' && (!isset($address['company']) or !$address['company'])) {
continue;
}
But there is something going on at the address checkout page it seems, the data in the "pre-selected" address (default) isn't used directly, and I also got an error when trying to fill a new address.
Note! Also changed city and postcode (plus added company name) should trigger a reload of shipping, to ensure the correct alternatives and price is displayed before pushing the continue button ...
Edit! Code fixing. -
Accepted Answer
This might be related: https://github.com/arastta/arastta/issues/527
I wonder if Arastta drops some data, without reloading it (from store/default), on all possible actions in the checkout. -
Accepted Answer
Your Reply

Please login to post a reply
You will need to be logged in to be able to post a reply. Login using the form on the right or register an account if you are new here.
Register Here »