News:

Support the VirtueMart project and become a member

Main Menu

[Solved]VirtueMart 2 to VM1 Table equivalence

Started by Nousol, December 02, 2013, 13:36:24 PM

Previous topic - Next topic

Nousol

Hi, I'm working in a project that is composed in 3 parts:

1- Migrating Joomla 1.5 web to 2.5 and all of it's content and modules -> DONE

2- Installing VM2 and importing the old stuff from from VM1 (media, categories, products) -> Done with some glitches (a lot of prices aren't well converted and I've tried to repeat migrating process thousands of times but doesn't work...)

3- An external application mixin access and visual basic. That app inserts products to the shop directly without loggin in website beacuse we store product in a massive way. The main trouble is that with V2 some table names are obsolete or doesn't exist any more. Let me explain:

mySQL = "INSERT INTO jos_vm_category1 ( category_id, vendor_id, category_name, category_description, " & _
                "category_thumb_image, category_full_image, category_publish, cdate, mdate, category_browsepage, " & _
                "products_per_row, category_flypage, list_order ) SELECT ORI.category_id, ORI.vendor_id, ORI.category_name, " & _
                "ORI.category_description, ORI.category_thumb_image, ORI.category_full_image, ORI.category_publish, " & _
                "ORI.cdate, ORI.mdate, ORI.category_browsepage, ORI.products_per_row, ORI.category_flypage, " & _
                "ORI.list_order FROM jos_vm_category AS ORI"


For example I know that vm_category has changed to virtuemart_categories, but for example "category_name" and "category_description" fields are not any longer in that table...Is there some documentation about internal changes? I've searched along the forum and (it's my fault, sorry) I couldn't find anything....

Thanks for your time!

Virtuemart Version: 2.0.24c

Joomla Version: Joomla! 2.5.16 Stable

GJC Web Design

I don't think there is any docs on VM1.1. to VM2.0 equivalency but if you look at the table structure it is fairly straight forward

names and desc have been moved to lang based tables

e.g. jos_virtuemart_categories_en_gb

media is stored in jos_virtuemart_category_medias

they are joined (linked) by virtuemart_category_id

products are the same system..

so for your example you just need to do  JOIN for those two tables for desc and images in the query

look in the admin models/category.php for examples

e.g.
FROM `#__virtuemart_categories_'.VMLANG.'` l
  JOIN `#__virtuemart_categories` AS c using (`virtuemart_category_id`)



GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Nousol

Thanks, that explanation will help us a lot.

Have a nice day :-D

Nousol

Anyway, just one more question.....

What's the diference between product_s_desc and product_desc for my app...wich one will be the correct?

WebStuff

#4
product_s_desc is the short description.
product_desc is the full description

i.e. product_s_desc = "Shiny Hammer with wood handle"
product_desc = "A fine and shiny hammer made from steel alloy with a clawed head and an ash wood handle."
:)

Nousol

Thanks a lot sir!  ;D

Quote from: mirrorsandglass on December 03, 2013, 13:19:10 PM
product_s_desc is the short description.
product_desc is the full description

i.e. product_s_desc = "Shiny Hammer with wood handle"
product_desc = "A fine and shiny hammer made from steel allow with a clawed head and an ash wood handle."
:-)