Could some one help me in joining 2 VirtueMArt tables?

ramki

New Member
Hi,

Could someone help me on the below issue? I have been trying from past 2 days, but no luck.

I am using

Joomla v2.5.6
VirtueMart v2.0.10
Fabrikar 3.0.6.3

I wanted to show VirtueMart tables using fabrikar form on the frontend, for that I need to use two VirtueMart tables in fabrikar.

1. virtuemart_products
2. virtuemart_products_en_gb

In the above two tables 'virtuemart_product_id' column is common. Whenever a product is added from VirtueMart Admin, the both tables are updated with the product ID.

I. I used 'virtuemart_products' table to show some fields on the frontend, and when form is submitted 'virtuemart_product_id' is generating and updating the DataBase properly, no issues here.

II. I used the second table 'virtuemart_products_en_gb' in fabrikar and showed (by using 'LEFT JOINS' in the 'virtuemart_products' table) some fields on the frontend as per my requirement.

But I can say my work is done when 'virtuemart_product_id' of 'virtuemart_products_en_gb' table is updated with the same 'virtuemart_product_id' of virtuemart_products.

But, the 'virtuemart_product_id' of 'virtuemart_products_en_gb' table is updating with '0' (zero), and when I am trying to add, one more record from frontend, the table virtuemart_products_en_gb is no way updating.

I hope you understand my problem, if you don't understand / if you can join me through TeamViewer to help me out it would me greatly appreciated.

Thanks,
Ramki
 
Hi

could you post a screen shot of your join settings and a url to the page please?
 
"friendly bump"

Rob, please it is very urgent , I strucked up from many days, just due to this issue.
 
products_en_gb.product_id can't be autoincrement, it's a foreign key to products (in your example the new record would need product_id=34 to keep the join and product_id=31 if autoincremented).
At least you'll have to set it autoincrement=no in the list definition.

But I don't know if fabrik3 can add records to lists with a non-autoincremental primary key in a join.
Ususally products_en_gb would need an additionel element/column integer, autoincrement to be used as fabrik internalid.
 
Hi Troester,

Thanks for your reply.

I remember, I did some joins (long back ago) for the above two types of tables, I recalled it, after I saw you reply.

1. I created 'id' (Auto Increment & Primary Key)) column in 'virtuemart_products_en_gb'

2. Then In the Fabrikar, selected (Primary Key= 'virtuemart_product_id') for 'virtuemart_products' tabel.

(Primary Key= 'id') for 'virtuemart_products_en_gb' tabel

3. Used LEFT Join for 2 tables (used 'virtuemart_product_id' to link two tables).

4. Used 'databasejoin' plugin on elements side, selected
Value = 'virtuemart_product_id', Label= 'virtuemart_product_id'.

Then added product from front-end, now the product is updating in both the tables on back-end. But the issue I found was, the product is adding only one time in 'virtuemart_products_en_gb, when I try to add one more product from front end, the 'virtuemart_products' table is updating perfectly, but the products_en_gb is not updating from second time onwards.

Can you please look into to this issue?

Thanks,
Ramki
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top