same shipping as billing not working

Phoca Cart - complex e-commerce extension
jkosick
Phoca Member
Phoca Member
Posts: 10
Joined: 04 Sep 2020, 06:12

same shipping as billing not working

Post by jkosick »

When clicking on the shipping is the same as billing address it does not seem to copy it to the shipping in the backend. When I look in the customer area it still has the shiiping address blank.

Tags:
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48386
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: same shipping as billing not working

Post by Jan »

Hi, it does not copy the address. User can store shipping address even it is not used for all orders. When billing address will be copied to shipping address, the real shipping address will be lost.

Shipping is the same as billing address checkbox is valid for current order only.

Jan
If you find Phoca extensions useful, please support the project
jkosick
Phoca Member
Phoca Member
Posts: 10
Joined: 04 Sep 2020, 06:12

Re: same shipping as billing not working

Post by jkosick »

The problem with that is when you go to get shipping info it is not there and then you have to go back to billing to get shipping. Also in the email notificaiton if you are expecting to use the shipping email tags that goes to the client the shipping information is blank. It would be much more benificail for it to just copy it the shipping. The check box seems to just allow the shipping fields to not be filled out.

Best case scenario would be to have it prefilled out with previous shipping info if exists. And if you choose to use your billing instead of the shipping that is pre-existing, then clicking the box would copy the billing to the shipping for the order for that order and not overiding the what is in the account. If you are a new customer then clicking the box would copy the billing to shipping and setting it as the defualt shipping for the current and future orders. Currently is seems strange to always have blank shipping info if they click the box.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48386
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: same shipping as billing not working

Post by Jan »

Hi, from technical point of view, having the same data stored twice is wrong.

When displying shipping items, better technical way can be doing some if clause - e.g. if there is no shipping value, use the billing value. But this can even be wrong. I can imagine, someone will say, it is wrong. When there is no data for shipping value, someone can say, just don't display it and display only data which are really available.

So this is really hard to solve and mostly this needs to be customized because it is different for each eshop.

Just imagine, user has billing address and shipping address. For one order he/she will select that the shipping address will be the same as billing address. So shipping address will be overwritten with billing address - in database, there are two the same data and user has no shipping data for next order. It is replaced by data which are stored yet. :idea: ... so this is really hard to solve generally :idea:

Jan
If you find Phoca extensions useful, please support the project
jkosick
Phoca Member
Phoca Member
Posts: 10
Joined: 04 Sep 2020, 06:12

Re: same shipping as billing not working

Post by jkosick »

Other cart systems I have used in the past work the way I descibed.

Perhaps it would be better if the shipping fields are null that the cart system will pull from the billing address for the shipping info so that the email tags will display properly. The customer will think there is a problem when the emails show nothing for the shipping. That would be my biggest concern when receiving a shipped product is to make sure it was going to the correct address.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48386
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: same shipping as billing not working

Post by Jan »

Hi,
Other cart systems I have used in the past work the way I descibed.
They store the same information twice into the database and make duplicities? If yes, this is not the right way, I think :idea:

Yes, as I wrote previously, I think about it. Add some parameter which will display billing field if the shipping field is empty.

So, this should be the flow:

- if enabled in options and e.g. the {s_name_first} is empty, the system will try to find {b_name_first}

This should solve this problem. :idea:

Jan
If you find Phoca extensions useful, please support the project
dangermark
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 24 Nov 2020, 03:38

Re: same shipping as billing not working

Post by dangermark »

- if enabled in options and e.g. the {s_name_first} is empty, the system will try to find {b_name_first}
Has this been implemented? I have searched the options but can't find anything. My issue is that when forwarding an order email to "another user" the delivery address is not populating.

So {s_address_1} {s_address_2} {s_city} {s_regiontitle} {s_zip} {s_countrytitle} all come in empty.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48386
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: same shipping as billing not working

Post by Jan »

Hi, it is still under development and after discussion another way was selected.

Since version 3.5.5 you will be able to set common variable, so following code will be possible:

{b_name_first} ... billing name will be displayed
{s_name_first} ... shipping name will be displayed
{bs_name_first} ... the system will try to display (or set) the billing name and if the billing name is empty it will try to set shipping name.

You can test it now first proposal when downloading this file:
https://www.phoca.cz/forumfiles/text.zip

and copying to folder:
administrator/components/com_phocacart/libraries/phocacart/text/

Then you will be able to use {bs_...} variables

I am now working on the option to use even sb_ (first shipping then billing) which is programatically more difficult but I hope, I will be able to add it to next version.

Jan
If you find Phoca extensions useful, please support the project
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48386
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: same shipping as billing not working

Post by Jan »

Hi, this should be ready in version 3.5.5:
https://www.phoca.cz/news/1111-phoca-ca ... a-released

Variables which are displayed in emails or descriptions can have more formats. Example: In previous version it was only possible to display first name as following variables:

{b_name_first} ... First name set in billing address is displayed.
{s_name_first} ... First name set in shipping address is displayed.

As of version 3.5.5, the following formats can be used:

{b_name_first} ... First name set in billing address is displayed.
{s_name_first} ... First name set in shipping address is displayed.
{bs_name_first} ... First name set in billing address is displayed. If it does not exist then first name set in shipping address will be displayed.
{sb_name_first} ... First name set in shipping address is displayed. If it does not exist then first name set in billing address will be displayed.
If you find Phoca extensions useful, please support the project
Post Reply