Plugin Usage
ExtraSearch Plugin is method to place ExtraSearch Catalog - Custom Catalog to the articles or to ExtraSearch layouts.
1. Enable Plugin.
2. Put following code into an article.
{extrasearchcatalog=tablename,pagelayout,|catalogitemlayout|,showpublished,filter,columns,|order by|,force Itemid}
- tablename - Catalog Table name
- pagelayout - the name of the layout to organize page
- catalogitemlayout - the name of the layout to organize items
- showpublished - true / false (also accepts: "showpublished", "showunpublished", "showany" or "1", "0", "2" any value but 1 and 0 will be treated as "showany")
- filter - "field1=value and field2=value", or leave it blank if no filter needed. For "or" operator use | example: field1=1|2
to get parameter from url query use "$get_parameter" method. - columns - show result in a table mode with number of columns, 1, 2, or 8 etc.
- order by - field to sort records by.
- force Itemid - used to set parameters and to add to the links.
Shopping Cart Layout Tags
Shopping Cart Tags available in Custom Record Layout and Catalog Details Layout:
{cart:count,prefix} — Returns the number of units of the current item (record) is added to the Shopping Cart
{cart:addtocart,prefix} — Returns a link that add current item to the Shopping Cart
{cart:setitemcount,prefix,|Button Lable|,|CSS Style|,|Button Image|} — Return a form to change the number of units.
Usage example: {cart:setitemcount,MyShoppingCart,Update,width:30px;,images/button.png}
{cart:form_addtocart,prefix,|Button Lable|,|CSS Style|,|Button Image|} — Same as above but it add number of units to allready existing units (not items) in the Shopping cart
{cart:deleteitem,prefix} — Returns a link that deletes current item of the Shopping Cart
Usage example: <a href= "{cart:deleteitem,MyShoppingCart}" >Delete</a>
Shopping Cart Prefix
This is used to have more the one «Shopping Cart» on a single table. For example, one is an actioal Shopping Cart another is a Wish List or Quotation.
Prifex is an adition texttual string added to the cockie.
To filter catalog page (Menu Item with Extar Search Catalog type or ExtraSearch Catalog Module), look for the box «Shopping Cart Prefix» and type desired prefix there.
Empty prefix is ok.
Search Module
This module type allow sophisticated search filters to be applied to any Catalog View
Parameters:
Field List - Is a list of fields (field names) with their special options. The list is separated by commas.
Syntax:
field_name:css style:special_option:"second_option"
Check Box field type options
- no option — only checked or only unchecked
- true — show records that have this check box checked or any
- false — show records that have this check box unchecked or any
- any - to show a select box that allows three ways:
- Checked
- Unchecked
- Show Any
second_option is for select box translations, by default="Any,Checked,Unchecked"
Quotes are extrimly important because commas along is a field's separator.
Misc
Change «Required» word after field input box
When you create a new menu item to let visitors add some records into your database table, «contact form» as an example. You have «Required Label» parameter there. Just type what you want to see instead of «Required» word.
Example: <span style="color: #FB1E3D; padding: 3px 1px 3px 1px; ">*</span>
Hidden fields and default values set in Layout.
For example, you have a filed «language» in a table, and in form layout you want to set it with Javascript methods.
And <input type="hidden" it to layout and add "comes_" to the filed name, like this:
<input type="hidden" name="comes_language" value="English" id="lang" />
Make sure that this field marked as "hidden" otherwise there would be unpredictable result, because the input box for it would be added automatically and become duplicated.
Also you may pass a default value in URL, add "es_" to the name of the field.
Example:
www.example.com/edit_item?es_language=English