VirtueMart Forum

VirtueMart 2 + 3 + 4 => Plugins: Payment, Shipment and others => Topic started by: jeisonsan on May 06, 2020, 05:07:15 AM

Title: Shipping plugins only work when the ST address is filled (Zip field) and not the
Post by: jeisonsan on May 06, 2020, 05:07:15 AM
I am from Brazil and virtuemart has lost all its strength, now we are a small group and every day we stop using Joomla / Virtuemart.
One of the problems we are having, that in this latest version, the Shipping plugins only work when the ST address is filled (Zip field) and not the BT address.

I believe it is a bug, we can guide us ...
Title: Re: Shipping plugins only work when the ST address is filled (Zip field) and not the
Post by: Jörgen on May 06, 2020, 07:15:12 AM
The ST address should be filled with the BT address. Do You have any overrides that do it differently? VM and Joomla versions ?

Of course the Shipping plugin should use the ST address, or do you disagree ? How would it else be possible to figure out correct shipping fees if the ST for some reason is not filled out ?

Jörgen @ Kreativ Fotografi
Title: Re: Shipping plugins only work when the ST address is filled (Zip field) and not the
Post by: GJC Web Design on May 06, 2020, 12:08:45 PM
Have u updated your shipping plugins?

Later code is

      $address = $cart -> getST();

      if(!is_array($address)) $address = array();

this will always get the correct address
Title: Re: Shipping plugins only work when the ST address is filled (Zip field) and not the
Post by: jeisonsan on May 06, 2020, 17:31:40 PM
Before, until version 3.4 when the BT address was filled in, it worked, the shipping methods appeared.
Today this does not happen, even if the customer indicates that the ST will be the same as BT. It only works if you fill in the ST address.
Title: Re: Shipping plugins only work when the ST address is filled (Zip field) and not the
Post by: AH on May 06, 2020, 17:36:26 PM
then check your shipping plugin as you were told above by GJC
Title: Re: Shipping plugins only work when the ST address is filled (Zip field) and not the
Post by: jeisonsan on May 08, 2020, 06:39:28 AM
I made the adjustment in the script and it seems that it worked, being that I didn't put the last version.
I will install the latest version.
Title: Re: Shipping plugins only work when the ST address is filled (Zip field) and not the
Post by: jeisonsan on May 08, 2020, 17:33:34 PM
I made the code change and tested it now in the current version, even so, it doesn't work, the person fills in the BT and doesn't show the methods.   :(
Title: Re: Shipping plugins only work when the ST address is filled (Zip field) and not the
Post by: pinochico on May 08, 2020, 18:14:03 PM
which shippments plugin you use?
Title: Re: Shipping plugins only work when the ST address is filled (Zip field) and not the
Post by: jeisonsan on May 08, 2020, 21:44:02 PM
We use Correios-VirtueMart-3 (Brazilian national shipping method plugin)
The strange thing is that it works in the previous versions, usually calculating both BT and ST.

On why i want it to work on BT:
Have you thought about making the user have to fill in the address twice? if the user checks at the checkout that he / she wants to receive at the same address {BT}, it gets faster and helps with sales.

url plugin :   https://github.com/luizwbr/Correios-VirtueMart-3
Title: Re: Shipping plugins only work when the ST address is filled (Zip field) and not the
Post by: jeisonsan on May 08, 2020, 22:17:20 PM
I put $ address = $ cart-> BT; if (! Is_array ($ address)) $ address = array ();
as the moment is working, I will do more tests    :D