BUG. Not Added new shipto address in Virtuemart 2.0.6 (fixed)

Started by serapol, April 24, 2012, 14:15:06 PM

Previous topic - Next topic

serapol

I noticed that after updating to 2.0.6 and Virtuemart make changes to the template no longer add additional shipping addresses.

The problem occurred in the edit_address.php catch pattern
<? php if (! empty ($ this-> virtuemart_userinfo_id)) {
echo '<input type="hidden" name="shipto_virtuemart_userinfo_id" value="'.(int)$this-> virtuemart_userinfo_id.' "/> ';
}
echo JHTML :: _ ('form.token');
?>


If the parameter $ new = 1 virtuemart_userinfo_id variable is set to 0. Since "! Empty ()" responds to this as an empty string is respectively in the model user.php not be carrying out the condition if (isset (shipto_virtuemart_userinfo_id)) and there are no records in the database.

Solving problems delete an additional condition in the template file, or to correct model user.php on line 865
if (isset ($ data ['shipto_virtuemart_userinfo_id'])) {
changed to:
if ($ data ['address_type'] == 'ST' | | isset ($ data ['shipto_virtuemart_userinfo_id'])) {

Please correct this in the next version, and I apologize for bad English

P.S. From the administrative part of the site as an additional shipping address is not added. On the solution of this problem, I have not understood

Milbo

I added your idea to the model and a fix to the layout, thx.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

woop

THANK YOU SO MUCH!! I just was struggling with this problem of being unable to save new shipping addresses :-)

But i´m still facing the unposibility of selecting my desired shipping address between the shipping address I have already saved.
Do you know any solution??

[attachment cleanup by admin]
Kind Regards,
Daniel Mateu Solé

serapol

This problem is a template, this checkbox is out of form. That is, data is not transferred to the script. The form actually starts after the pricelist. I solved this problem by the transfer of contact information and shipping address down.

Like this


[attachment cleanup by admin]

woop

Hi Serapol,

You are right it´s an issue of template. I´ve solved it just by changing the text of the button of "save" for "change delivery address" so it´s more clear for the user what to do if he wants to change between his delivery addresses.
Definetly I think that the option of picking the delivery address in radio fields from VM1 was a more logic solution from the user´s point of view.
Kind Regards,
Daniel Mateu Solé

ivus

Could someone please test this on their install.

I have the latest Joomla 2.5.6 and VM 2.0.8c, and I can see the above code changes in place within my model. However, I am now getting this rather odd bug and am not sure if it's just me?

I do have a few template overrides in place, but have disabled them during my fault finding expedition and found the bug to possibly exist in the core code. I have not hacked the core... anyway, please try to replicate this bug:


  • log is as a user
  • in your SHOPPER INFORMATION TAB, create a new shipping address (NEW) - what you should see is a page with entirely blank fields.
  • fill in the form and click on save - you should then get redirected back to the previous screen and the new address item should appear
  • THE BUGGY PART - try and create another new shipping address -> what I'm getting is a page prefilled with my previous form? where I was expect another blank form page?

If anyone has experienced the same problem and has a solution, I'd muchly appreciate it.

Ta


resorter

Quote from: ivus on July 17, 2012, 17:19:18 PM
Could someone please test this on their install.

I have the latest Joomla 2.5.6 and VM 2.0.8c, and I can see the above code changes in place within my model. However, I am now getting this rather odd bug and am not sure if it's just me?

I do have a few template overrides in place, but have disabled them during my fault finding expedition and found the bug to possibly exist in the core code. I have not hacked the core... anyway, please try to replicate this bug:


  • log is as a user
  • in your SHOPPER INFORMATION TAB, create a new shipping address (NEW) - what you should see is a page with entirely blank fields.
  • fill in the form and click on save - you should then get redirected back to the previous screen and the new address item should appear
  • THE BUGGY PART - try and create another new shipping address -> what I'm getting is a page prefilled with my previous form? where I was expect another blank form page?

If anyone has experienced the same problem and has a solution, I'd muchly appreciate it.

Ta


Hi, i have got the same bug and also even i delete additional address and return to ckeckout i see delted address again
Thanks

jenkinhill

And you are using those very old VM versions as well? This thread is over 2 years old.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum