Helpful information for integrating Breezing Forms and VirtueMart 2
We try to add helpful tips that come from client questions and tickets here.
Can I embed multiple Breezing Forms into a single VM2 product?
Question: I have two forms and would like both of them to show up inside one product. Can I do this?
While technically feasible, we don't recommend trying to place more two or more Breezing Forms into the same VM2 product.
When you have multiple forms, you need a high amount of expertise to make them work together on the page effectively. Only one form on the page can have the End Submit code snippet installed, which is necessary for pulling the field values through to VirtueMart. So you would need to somehow present both forms on the page to the customer, yet only have a submit button on one form. So what happens when the customer doesn't fill out one of the forms without a submit button correctly and the item isn't really ready to add-to-cart? How will your page handle validation when the form with the submit button is completed successfully, but another form on the page without a submit button is not?
Makes our heads spin just to think about the ways that customers could get confused in this type of multi-form situation. Far better to build one single combined Breezing Form, with different sections and one submit button, than to try to embed multiples into the same product page.
For database exports, does VM2 store the Breezing Form form id number?
Question: I need to export the data out of Breezing Forms for all orders. Is there a record of the Breezing Forms form id number in the VirtueMart 2 order?
Answer: Yes, if you are a programmer you can find the form id number for a VirtueMart 2 order here:
Form data is stored in column "product_attribute" of table #__virtuemart_order_items. That column contains a piece wrapped in a json structure.
You will want to look for "my_vmbf_plugin_bf_id=<number>" and use that number to correspond to the id number in table *#__facileforms_records* that contains the corresponding Breezing Forms data.
How do I change where the Form shows up inside the product page?
Question: I don't like where the form is showing up on my product page. How do I fix this?
Answer: Our extension places the embedded Breezing Form in the same default location as any other VirtueMart Custom Fields. To change the placement, you will need to modify your VM product template and possibly modify the CSS if you want to change the layout.
In the example we've used throughout this documentation, by default the Breezing Form showed up in our demo VM2 site this way at first:
Look for this template file to modify your product page layout: <joomla root>/components/com_virtuemart/views/productdetails/tmpl/default.php
Inside that file, look for this default div tag section: <div class="width50 floatright">
You can change where the form shows up by moving the whole div tag section. For example, by default VirtueMart places custom fields above the description, but you can move this section to be after it to relocate it on the page.
You also can change the div tag to give your form more room inside the layout if needed. For example, to give the form the full content width,
Change: <div class="width50 floatright"> to instead be: <div class="width100 floatleft">
Don't want to do this yourself? Polished Geek can customize your template and design for you, for an additional fee. Contact us to get a quote.
Is there a faster way to add a VM2 custom field trigger to a large number of products?
Question: Since I have to add the specific VM2 custom field to my products in order to embed the form, is there a faster way to bulk add VM2 custom fields to a large number of products at once?
Unfortunately, this is a VirtueMart limitation (at least as of version 2.0.12).
In native VM2, custom fields have to be added to each product individually, but of course if you have hundreds (thousands!) of products, this is a time-consuming and tedious task. Yet the VM2 custom field trigger is necessary for the integration to work.
We recommend using a bulk import tool such as CSV Improved to see if that can reduce your administrative time associating VM2 custom fields with a large number of products.