Author Topic: Partial Solution to Migration of Product Attributes  (Read 30264 times)

raycarter

  • Beginner
  • *
  • Posts: 39
Re: Partial Solution to Migration of Product Attributes
« Reply #30 on: May 15, 2013, 17:26:08 pm »
Hi,
it doesnt run.
When I start the script it says
Code: [Select]
Connted to DB - Beginning operation

INSERT INTO jos__virtuemart_customs (custom_title,custom_tip,field_type,is_cart_attribute,published) VALUES
        ('Größe',"","V","1","1")
all end
There are no attributes in the new tables of VM2.

Can you help?

Did you adjust the configurations in the beginning of the code?
The new database name, the old database name.

Also make sure old database tables are present side by side the new tables.


vragec

  • Beginner
  • *
  • Posts: 1
Re: Partial Solution to Migration of Product Attributes
« Reply #31 on: May 16, 2013, 18:06:25 pm »
Hi,

Great script, but it doesnt work for me.

It writes out message:


Connted to DB - Beginning operation



Warning:  mysql_result() expects parameter 1 to be resource, boolean given in /home/ortopeds/public_html/xxxx/xxxx/importer.php on line 132



Warning:  mysql_result() expects parameter 1 to be resource, boolean given in /home/ortopeds/public_html/xxxx/xxxx/importer.php on line 132

INSERT INTO j25_virtuemart_customs (custom_title,custom_tip,field_type,is_cart_attribute,published) VALUES
        ('Barva',"","V","1","1")
all end



Any ideas?

raycarter

  • Beginner
  • *
  • Posts: 39
Re: Partial Solution to Migration of Product Attributes
« Reply #32 on: May 20, 2013, 06:09:15 am »
Hi,

Great script, but it doesnt work for me.

It writes out message:


Connted to DB - Beginning operation



Warning:  mysql_result() expects parameter 1 to be resource, boolean given in /home/ortopeds/public_html/xxxx/xxxx/importer.php on line 132



Warning:  mysql_result() expects parameter 1 to be resource, boolean given in /home/ortopeds/public_html/xxxx/xxxx/importer.php on line 132

INSERT INTO j25_virtuemart_customs (custom_title,custom_tip,field_type,is_cart_attribute,published) VALUES
        ('Barva',"","V","1","1")
all end



Any ideas?

Hi, its unfortunate that it didnt work. Can you follow the last post and tell me if you made sure that all new and old tables were in place? and you already imported the products to new VM.

jgentles

  • Beginner
  • *
  • Posts: 3
Re: Partial Solution to Migration of Product Attributes
« Reply #33 on: June 11, 2013, 17:48:24 pm »
Thank you very much for this solution. It worked perfectly for me and saved me so much time. Thank you! Thank you! Thank you!

Janice Gentles-Jones
JGJ Consulting
www.onlinesuccessmap.com

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10087
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Partial Solution to Migration of Product Attributes
« Reply #34 on: June 14, 2013, 15:06:27 pm »
Looks good. I took the code and added it to the core, to the migrations tab. But I cannot test it. The code is just roughly added and made working with the joomla db. It would be cool if someone could enhance it in future there, so it is directly in the code :-) Please check 2.0.21E http://dev.virtuemart.net/projects/virtuemart/files
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

raycarter

  • Beginner
  • *
  • Posts: 39
Re: Partial Solution to Migration of Product Attributes
« Reply #35 on: June 15, 2013, 22:51:42 pm »
Looks good. I took the code and added it to the core, to the migrations tab. But I cannot test it. The code is just roughly added and made working with the joomla db. It would be cool if someone could enhance it in future there, so it is directly in the code :-) Please check 2.0.21E http://dev.virtuemart.net/projects/virtuemart/files

Hello Milbo. Thats a good news.  But i dont see any 2.0.21E yet.


I had done this script for one of my sites and thought i would share it. The script is not complete and is missing atleast 2 things:

1. it shouldnt keep importing attributes over and over again if ran more than once.

2. Someone asked before that how could they import attributes defined like the following :

Size,110 x 170cm[=104.17],140 x 200cm[=158.33],170 x 240cm - SOLD OUT[=208.33],200 x 300m - SOLD OUT[=283.33],250 x 350cm[=483.33]

You'll notice that the price is the final value price not an addition to the base price and i have not handled this in my code. I can do this if i only i knew what such products become in Virtuemart 2.  Do they become cart variants?


Let me know if there is anything else that i missed and i will do it.

Thanks


Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10087
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Partial Solution to Migration of Product Attributes
« Reply #36 on: June 16, 2013, 20:00:24 pm »
Here http://forum.virtuemart.net/index.php?topic=115877.0

We had this code also already in the migrator, but it was leading to errors sometimes. So I think it is better to have it in independend tasks. Your function is in the BE/helpers/migrator.php. At the end of the line is your function. I just added the resume, please check it. It would be also nice if someone debugs the migrate related products solution.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10087
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Partial Solution to Migration of Product Attributes
« Reply #37 on: June 26, 2013, 23:02:03 pm »
Please test http://forum.virtuemart.net/index.php?topic=115877.0 Version G is now also importing the values correctly. But we had to drop the =values, because they make not really sense (would just change the baseprice)
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

raycarter

  • Beginner
  • *
  • Posts: 39
Re: Partial Solution to Migration of Product Attributes
« Reply #38 on: August 08, 2013, 03:52:58 am »
Please test http://forum.virtuemart.net/index.php?topic=115877.0 Version G is now also importing the values correctly. But we had to drop the =values, because they make not really sense (would just change the baseprice)

I had started to work on it to improve the code. i had fixed it for + and - scenario. I worked on the = case as well but according to my knowledge those are child products (if i am not wrong). so one can create child products out of them. i wrote some more code and then left the country for some days and could never get back to it.
I will come back to it soon and share my code.

_dj

  • Beginner
  • *
  • Posts: 23
  • VirtueMart Version: 2.1
Re: Partial Solution to Migration of Product Attributes
« Reply #39 on: September 17, 2013, 13:41:16 pm »
Your code is working fine for "Attribute List" but for "Custom Attribute List" it doesn't working. Will you please add some code or comments to make this.

_dj

  • Beginner
  • *
  • Posts: 23
  • VirtueMart Version: 2.1
Re: Partial Solution to Migration of Product Attributes
« Reply #40 on: September 17, 2013, 14:39:50 pm »
One more thing, after selecting "Attribute List" the price is not updated according to the selected items, in the cart.
As in attached pics. pic 11 shows the old version attribute list and pic 10 shows the updated one but haven't migrate price. Please have a look on it.

[attachment cleanup by admin]

Maxim Pishnyak

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2660
Re: Partial Solution to Migration of Product Attributes
« Reply #41 on: September 17, 2013, 17:16:34 pm »
CSVI Improved is the way to go.

_dj

  • Beginner
  • *
  • Posts: 23
  • VirtueMart Version: 2.1
Re: Partial Solution to Migration of Product Attributes
« Reply #42 on: September 18, 2013, 08:52:42 am »
raycarter i'm waiting for your reply. Please give me way how i can use your code to migrate "Custom Attribute List".

Maxim Pishnyak

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2660
Re: Partial Solution to Migration of Product Attributes
« Reply #43 on: September 18, 2013, 08:59:01 am »
CSVI Improved is the way to go.
Why even don't try proposed solution? Solution which will be supported for you by VM and CSVI strong support forums?

_dj

  • Beginner
  • *
  • Posts: 23
  • VirtueMart Version: 2.1
Re: Partial Solution to Migration of Product Attributes
« Reply #44 on: September 18, 2013, 10:48:12 am »
Maxim Pishnyak my client doesn't want any paid extension. Everything has been migrated. Just for Custom attribute i have to purchase a new extension. That doesn't make any sense.