News:

Support the VirtueMart project and become a member

Main Menu

Patch file from 1.1.3 to 1.1.5 is missing PayPal API payment method

Started by aravot, October 22, 2010, 21:38:24 PM

Previous topic - Next topic

aravot

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', '', '', '')


zanardi

--
Francesco (zanardi)
http://extensions.gibilogic.com
@gibilogic on Twitter

aravot

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

zanardi

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.

--
Francesco (zanardi)
http://extensions.gibilogic.com
@gibilogic on Twitter

aravot

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.

zanardi

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).
--
Francesco (zanardi)
http://extensions.gibilogic.com
@gibilogic on Twitter

zanardi

--
Francesco (zanardi)
http://extensions.gibilogic.com
@gibilogic on Twitter

aravot

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

zanardi

--
Francesco (zanardi)
http://extensions.gibilogic.com
@gibilogic on Twitter

aravot

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.

zanardi

I thought so, but now i will surely double check 1.1.5 to 1.1.6 patch. Thank you for your notification.
--
Francesco (zanardi)
http://extensions.gibilogic.com
@gibilogic on Twitter

zanardi

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.
--
Francesco (zanardi)
http://extensions.gibilogic.com
@gibilogic on Twitter

zanardi

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).
--
Francesco (zanardi)
http://extensions.gibilogic.com
@gibilogic on Twitter


zanardi

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.
--
Francesco (zanardi)
http://extensions.gibilogic.com
@gibilogic on Twitter