Thursday 28 Mar 2024

Documentation v3

Virtuemart 3.x   Virtuemart 2.x

System Requirements

  • Joomla 2.5, 3.x
  • Virtuemart 3.0.x, 2.6.x, 2.0.x

Menu

 

Installation & Configuration

You can download the filter from the same page you bought it from. You'll see a download button right under buy button after purchase. 

 

This quick illustrated guide will let you grasp the basics of configuring our module. 

 

Install the Filter and configure Custom Fields

  1. Install the filter archive (module & plugin) using Extension Manager.
  2. Publish the plugin (virtuemart 3 multiple customfield plugin) through Plug-in Manager.
  3. Go to virtuemart 3 and create a new parent custom field and save.
  4. Create a plugin custom field of our unique plugin type "virtuemart 3 multiple customfield plugin" and save.
  5. Indicate title, template and add search values (parameters). Save.
  6. Go to Products. Select an existing product or create a new one.
  7. Go to Custom Fields tab. Choose the parent you created in step 3 and save.
  8. Select appropriate search values for the product. Save & Close.
 

1 install 2 publish 3 parent 4 plugin configure products product parent parameters

 

 

Create a Search Results page

  1. Create a new hiddden menu item for displaying search results.
  2. Select VirtueMart Category Layout (Category) as Menu Item Type.
  3. Give it a desired title and alias. Leave category setting as top level category. Save & Close.

 

menu item menu type menu details


Configure and customize through module settings

  1. Locate the module in Module Manager (easiest with type filters).
  2. Give it a title, select position and publish it. Assign it to pages, make sure it's published in Search Results menu item you created. Select the parent custom field you previously created. 
  3. Customize categories, manufactuer, price and custom fields filters to your liking (or disable).
  4. After having configured the module as described above it will look somewhat like this.

 

select module module settings 1 module settings 2filter

 

Summary

Our plugin is responsible for unique plugin type for custom fields. It allows you to configure custom fields: select a title, template, search method and create search parameters (values). That's why you want to publish the plugin first.

 

Custom fields are organized in "bundles": you can create numerous custom fields (used for different search criteria) and tie them all up to one parent: in module settings you will only need to select one parent instead of selecting each individual custom field.

 

A VirtueMart category output template is used for search results output - that is what the menu item is for. It's so much easier to use AJAX with default template, that's why we didn't create our own. You can still customize it though by editing the VirtueMart template file.

 

Addiotional filters such as category, manufacturer and price filter can be configured through module settings. You will find many useful customization options in module settings. Don't forget to assign it to the search results menu item!

 

Activation

In order for the filter to work properly it needs to be activated. To activate the extension:

 

  1. Locate our plug-in (virtuemart 3 multiple customfield plugin) through Plug-in Manager and click on it.
  2. In Basic Options click on the link "get activation key" just above the activation key field.
  3. You will be directed to our website where you'll need to fill out your email and send request.
  4. You will receive your activation key via email almost instantly. Copy the activation key and paste it into appropriate field in plug-in options. 
 

activation_1 activation_2 activation_3 activation_4

 

Custom Field Templates

You can customize the filter to your liking by changing templates of your custom fields.

 

For custom development

Feel free to edit these templates if you need to change something: all templates are stored in the following folder: [_site_root_]/modules/mod_virtuemart_param_filter/tmpl. It is highly recommended to copy the templates you need to edit to [_site_root_]/templates/[_your_template_]/html/mod_virtuemart_param_filter/ 

and only then make changes to the copied files. If you edit the them in the original location your changes will be lost during an update. Please pay attention to the list of updates on our website: if the templates get updated you will want to know about it. We usually release an update at least once every two months. 

 

Templates for custom fields displayed on product page are stored in a different location: [_site_root_]/plugins/vmcustom/param/param/tmpl. Again don't edit them in the original location. Copy the template files to the following directory of your website: 

[_site_root_]templates/[_your_template_]/html/plugins/param/ (OR /templates/[_your_template_]/html/vmcustom/param/ depending on VM3 version

and then feel free to make changes.

 

Here is a complete list of available templates:

 

checkbox  checkbox 
select
select multiple
select 
select-chosen
select-chosen multiple
mselect chosen 
radio  radio 
slider
slider_double (not recommended to use more than 20 text values) 
slider double
input_double input double
checkbox-colors checkbox-colors

 

 

Advanced settings

Customfield settings

1. It makes sense to change data type only for ‘slider’ template. If data type is “text” the slider will move among the existing elements, but if it is "numeric", it will move with interval 1 or more (depending on visible span of slider). It is recommended to use "Numeric" data type in case you want a slider with more than 20 numeric values. For all other cases we recommend to use “Text” customfield type. Value "-13692" is reserved for numeric type customfield.

 

2. Fields work as cart attribute. But you won't be able to modify the final price of the product with our fields. 

 

Module settings. Basic parameters. 

All the settings have pop-up tips, so I’ll describe only nuances and details for some values:


"Field list parent" – indicate ID of parent field.

 

"Automatic selection of fields list" – Automatically selects fields list depending on products in current and/or sought-for categories.  Searches for products fields in particular category, doesn’t consider subcategory. If possible do not use initial ones, but make modules copies and link them to categories. There is a detailed example of how to work with it on demo-site  - "Auto" module.

 

"AJAX module update" – if you specify/ change any filter parameterо the filter is updated by the means of AJAX. Only the module is updated!

 

"Number of correlated products" – displays the number of items found by this parameter, on the basis of the options selected. If there is no indication "AJAX module update", it only works on the search results page.
count

 

"Products number quantity" – means of values display, which is used if there are no products correlating to search parameters. If you choose "hidden" and "AJAX module update ", you get an imitation of linked lists. If there is no indication "AJAX module update", it only works on the search results page.
count tmpl

 

"AJAX products update" – if you set/make changes to any filter parameter by the means of AJAX the indicated search page element is updated. Specify CSS-selector, while processing jQuery is used. Only the indicated element is updated. To update products list specify the block, in which the component is output. For example, if your template displays "<div id="maincontent"><jdoc:include type="component" /></div>", you should indicate "#maincontent".

 

"Assign to field" – chained lists functionality. Allows to bind one field with another. As a result, an assigned field will only appear if you make selection on the field you assigned it to.


AJAX  reinitialization” – if updated by the means of AJAX DOM-structure of the page is changed and newly added elements are not visible for previously declared javascript functions. You should reinitialize these functions.

"JS reinitialization after AJAX module update" – set functions for module elements processing. Proceed as shown in the example below.

"JS reinitialization after AJAX products list update" – set functions for block elements processing, specified in "AJAX products update". For example, to enable pop-up images of products and cart after they have been updated by AJAX, type in the following:

SqueezeBox.assign($$('a.modal'), {parse: 'rel'});
jQuery(document).ready(function($) {
  $('.orderlist-container').hover(
    function() { $(this).find('.order-list').stop().show()},
    function() { $(this).find('.order-list').stop().hide()}
);
Virtuemart.product($("form.product"));
  $("form.js-recalculate").each(function(){
    if ($(this).find(".product-fields").length) {
      var id= $(this).find('input[name="virtuemart_product_id[]"]').val();
      Virtuemart.setproducttype($(this),id);

    }
  });
});

Example of work on demo-site. Module "Laptops filter".

 

Module link – module can be linked to the categories and to the inner pages of virtuemart 3 shop as well. Use link to the categories if you don’t have separate menu items for categories or standard link mechanism is not working properly. ATTENTION: Step 2 of the installation describes the process of creation of a basic menu item for search – all search modules should be linked to that item!

 

Frequently Asked Questions

1. When filter results are output the categories are displayed in the upper part of the page. How to remove them?
2. How to display a message “Sorry, no matches found” upon unsuccessful search query when there are no products that match filter parameters?

3. Can I change the looks of the module so it would match my website theme?

4. How can I change the description on the search button?

5. Is it possible to use custom fields of your plugin type as cart attribute? And can the final price of the product be altered depending on the checked options?

 

Answers

1:

On search menu item set "Show categories" to "No".
menu details

2:

Virtuemart itself is responsible for the output. To change the category mapping follow the tips below:
File: /components/com _virtuemart/vie ws/category/tmp l/default.php (or the analog in your catalog):
after

} elseif ($this->search !== NULL) {
echo JText::_ ('COM_VIRTUEMART_NO_RESULT') . ($this->keyword ? ' : (' . $this->keyword . ')' : '');
}

insert:

elseif(JRequest::getBool('search')){
echo 'Sorry, no matches found. You will be automatically redirected to the catalogue.'; // Message - change to what you like
echo '<script type="text/javascript"> setTimeout(function(){window.location.href = "/";}, 3000);</script>'; // Redirects to main page after 3 seconds
}

 

3. You can change the way the module looks by means of CSS. Many of our customers change the styling to their liking with no problems. Unfortunately we cannot help you with front-end development, so changing the looks is up to you. It's easy though and you shouldn't encounter any problems doing that. 

 

4. Go to Language Manager -> Overrides tab, search for MOD_VMCUSTOM_PARAM_FILTER_SEARCH constant and define a new value for it


5. Yes it is possible to use custom fields of our plugin type as cart attribute. To do that simply set cart attribute option to "Yes" in the required field options. But the final price of the product cannot be altered using our custom fields.

 

Using CSV. CSV Improved Pro 6+

Product Filter for virtuemart 3 is currently compatible with CSV Improved 6+ which is a paid version of the component.

 

 

 

 

 

 

Site navigation

Copyright © 2012-2024 myext.eu.