VirtueMart Forum

VirtueMart Dev/Coding Central: VM1 (old version) => Virtuemart 1.1 Development (Archiv) => Quality & Testing VirtueMart 1.1.x => Topic started by: aravot on October 22, 2010, 21:38:24 PM

Title: Patch file from 1.1.3 to 1.1.5 is missing PayPal API payment method
Post by: aravot on October 22, 2010, 21:38:24 PM
Patch file from 1.1.3 to 1.1.5 (Patch-VirtueMart-1.1.3-1.1.5.j15) is missing PayPal API payment method.

# Add new PayPal API payment method
INSERT INTO `#__{vm}_payment_method` VALUES( 4, 1, 'PayPal (new API)', 'ps_paypal_api', 5, '0.00', 0, '0.00', '0.00', 0, 'PP_API', 'P', 0, 'N', '', '', '')

Title: Re: Patch file from 1.1.3 to 1.1.5 is missing PayPal API payment method
Post by: zanardi on October 24, 2010, 13:12:57 PM
I just uploaded a new version of the patch at

http://dev.virtuemart.net/redmine/issues/181

Can you test it? Thank you.
Title: Re: Patch file from 1.1.3 to 1.1.5 is missing PayPal API payment method
Post by: aravot on October 24, 2010, 22:56:22 PM
The patch looks good except rename following files.

Rename
UPDATE-SCRIPT_VirtueMart_1.1.3-to-VirtueMart_1.1.4.sql
to
UPDATE-SCRIPT_VirtueMart_1.1.3-to-VirtueMart_1.1.5.sql

and rename
UPDATE-SCRIPT_VirtueMart_1.1.4-to-VirtueMart_1.1.5.sql
to
UPDATE-SCRIPT_VirtueMart_1.1.3-to-VirtueMart_1.1.5.sql

Another issue I found is UPDATE-SCRIPT SQL files are not executed not sure if users are aware of this, I for one didn't know until today I thought when running the update it updated everything.

Tried to execute the SQL files manually got following error.
Quote#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INSERT INTO `#__{vm}_payment_method` VALUES (19, 1, 'MerchantWarrior', 'ps_merch' at line 2
Title: Re: Patch file from 1.1.3 to 1.1.5 is missing PayPal API payment method
Post by: zanardi on October 31, 2010, 11:44:24 AM
I cannot rename the files. They should be coherent with every other patch of full package, so i cannot do a single "1.1.3 to 1.1.5" sql update file.

I fixed the error you mentioned, there was a missing ";". The patch is at the same location in Redmine.

SQL automatic update was not included until 1.1.5; when patch from 1.1.5 to 1.1.6 will come out, the SQL update will be automatic.

Title: Re: Patch file from 1.1.3 to 1.1.5 is missing PayPal API payment method
Post by: aravot on October 31, 2010, 18:13:01 PM
Quote from: zanardi on October 31, 2010, 11:44:24 AM
I cannot rename the files. They should be coherent with every other patch of full package, so i cannot do a single "1.1.3 to 1.1.5" sql update file.

If the patch is for upgrading from Virtuemart 1.1.3 to Virtuemart 1.1.5, shouldn't the SQL file state the same 'UPDATE-SCRIPT_VirtueMart_1.1.3-to-VirtueMart_1.1.5.sql' and not UPDATE-SCRIPT_VirtueMart_1.1.3-to-VirtueMart_1.1.4.sql?
Users updating from 1.1.3 to 1.1.5 might not run the sql file thinking it is only for updating from 1.1.3 to 1.1.4.
Title: Re: Patch file from 1.1.3 to 1.1.5 is missing PayPal API payment method
Post by: zanardi on October 31, 2010, 20:31:00 PM
Well, you've got a point. Yes, I think we can do this. I am going to update the patch as soon as Redmine come back to life (it's incredibly slow at the moment).
Title: Re: Patch file from 1.1.3 to 1.1.5 is missing PayPal API payment method
Post by: zanardi on November 10, 2010, 12:13:21 PM
@Aravot:
i uploaded a new patch. Let me know it it's ok. http://dev.virtuemart.net/redmine/issues/181
Thank you.
Title: Re: Patch file from 1.1.3 to 1.1.5 is missing PayPal API payment method
Post by: aravot on November 12, 2010, 06:04:56 AM
Tried the SQL patch file give following error.

Quote
Error

SQL query:

#############################################
# SQL update script for upgrading
# from VirtueMart Version <= 1.1.3 to VirtueMart 1.1.4
#
#############################################
# Allow Tax Rates with more than 5 Decimals
ALTER TABLE `jos_vm_tax_rate` CHANGE `tax_rate` `tax_rate` DECIMAL( 10, 5 ) NULL DEFAULT NULL # Add new PayPal API and MerchantWarrior payment methods
INSERT INTO `#__{vm}_payment_method`
VALUES ( 4, 1, 'PayPal (new API)', 'ps_paypal_api', 5, '0.00', 0, '0.00', '0.00', 0, 'PP_API', 'P', 0, 'N', '', '', '' ) ;

MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INSERT INTO `#__{vm}_payment_method` VALUES( 4, 1, 'PayPal (new API)', 'ps_paypa' at line 2

Remember to rename Virtuemart 1.1.4 to Virtuemart 1.1.5
Title: Re: Patch file from 1.1.3 to 1.1.5 is missing PayPal API payment method
Post by: zanardi on November 13, 2010, 10:09:05 AM
Done it, let me know if this time it is right... :-)

http://dev.virtuemart.net/redmine/issues/181
Title: Re: Patch file from 1.1.3 to 1.1.5 is missing PayPal API payment method
Post by: aravot on December 17, 2010, 18:30:34 PM
Quote from: zanardi on October 31, 2010, 11:44:24 AM
SQL automatic update was not included until 1.1.5; when patch from 1.1.5 to 1.1.6 will come out, the SQL update will be automatic.

Was SQL updated added, because I tested by updating a 1.1.5 site to 1.1.6, the SQL didn't update.
Title: Re: Patch file from 1.1.3 to 1.1.5 is missing PayPal API payment method
Post by: zanardi on December 17, 2010, 23:20:20 PM
I thought so, but now i will surely double check 1.1.5 to 1.1.6 patch. Thank you for your notification.
Title: Re: Patch file from 1.1.3 to 1.1.5 is missing PayPal API payment method
Post by: zanardi on January 05, 2011, 13:25:00 PM
I can confirm that auto SQL update is still not working. I will have a look at it, if i only have to change patch update.xml file i will do that. If VirtueMart update class is still broken, i will leave it alone for 1.1.x series.
Title: Re: Patch file from 1.1.3 to 1.1.5 is missing PayPal API payment method
Post by: zanardi on January 06, 2011, 19:04:49 PM
It was another bug in update.class.php. In the previous version i fixed it for PHP5 simplexml class and not for VirtueMart simplexml.
Now it should be definitely fixed, but it will have to wait until 1.1.7 to be effective, so it will only apply from 1.1.7 to 1.1.8 (if we ever get there).
Title: Re: Patch file from 1.1.3 to 1.1.5 is missing PayPal API payment method
Post by: aravot on January 06, 2011, 19:30:00 PM
Thank you, do you have a list of bugs for 1.1.7 or do you want me to create one for you?
Title: Re: Patch file from 1.1.3 to 1.1.5 is missing PayPal API payment method
Post by: zanardi on January 07, 2011, 10:23:11 AM
All confirmed bugs are on http://dev.virtuemart.net and there are already a few.

I also bookmarked a lot of threads on this forum, to check them and see if they are really bugs. If they are, i will insert them in http://dev.virtuemart.net.

So at the moment i don't need a different list, thank you. I will reply to topics once i got to solve anything.