Miva 10 is here! See what's new | View Full Feature List
Custom Field Groups make it easier to organize and view your custom fields.
We created two custom field groups: "Motherboard Spec Fields" and "Tower Cases", and assigned each field to a group. Now we can sort the custom fields by clicking on the Group column title.
In this example we'll create a custom category field that allows us to display or hide categories in the category tree.
3.1. Go to > Catalog > Categories tab > (edit a Category) > Custom Fields tab.
After you create a custom field of type "Category", you'll see a new tab "Custom Fields" when you edit a category. The new tab shows the custom field that you created.
For our example, we'll set the value of this field to "False".
5.1. Go to > User Interface > Settings tab > Category Tree Template tab.
5.2. Add the field. In the Custom Fields section, click on the field named "Display", then click the Select button. (To reduce overhead in the admin interface, only custom fields that have been selected can be referenced in the template code.)
5.3. Edit the template code. In the category tree template code we'll add code to scan the value of the "Display" field for each category. Categories where the Display field contains the string "true" will be shown in the category tree.
5.4. The new code we'll add to the template field is:
This example shows how to create a custom product field and one example of how such a field can be used.
3.1. Go to > Catalog > Products tab > (edit a product) > Custom Fields tab.
When you edit a product now, you'll see that there is a new tab called "Custom Fields". In this new tab is the custom product field that you created.
|The custom field that we created, "MSRP", now shows up when we edit a product. We'll set the value of this field to "$25.00".|
4.1. Go to > User Interface > Pages tab > (edit page PROD) > Page tab > Product Display Layout section.
4.2. Click on the custom field ("MSRP" in our example), then click the Select button. (To reduce overhead in the admin interface, only custom fields that have been selected can be referenced in the template code.)
4.3. In the Page tab, click Update.
In our example the custom product field automatically showed up in our on-line store because we had not modified our product page template code. If you have modified your product page template code, you must:
In this example we'll show how to use the Image Upload field type to add content to your store pages that customers can download.
1.1. Go to > Domain Settings > Domain Details tab > Upload Settings section.
1.2. In the Upload Settings section, add "PDF" to the Image Extension Types field:
4.1. There is now a tab called "Manuals", created by our custom field group.
4.2. The Manuals tab contains our custom field: "User Manual 01"
7.1. Click on the custom field.
7.2. Click Select.
7.3. Click Update.
8.1. If you haven't already, click on the link so that you can see the template code.
8.2. Look for the template code:
and change it to:
There are times when you might want to capture information while a customer is shopping in your store and save that information to your store database. For example, you might want to capture the customer's IP address and save it with the order record. In releases before PR8 Update 9, you could capture the information, but to save it to the database you had to use a third party module.
PR8 Update 9 added 16 new read/write template functions that let you attach information that you've captured to different types of records. You can use these functions to save and display a wide variety of data:
In this example, we'll show how to put a drop-down list on the OSEL page (Checkout: Shipping/Payment Selection) and save the customer's selection to the basket record.
Normally, the custom fields that you attach to a basket record are lost when the basket is deleted. However, there is a way to "convert" the information and permanently save it in the database with the customer's order. Baskets are deleted when:
Custom fields are added to a page with the "customfields" item. The customfields item is already enabled on every default page in your store (every page in an "out of the box" store). If you want to use custom fields on a new page that you've created, you have to add the customfields item manually. See Editing Items.
5.1. Go to > User Interface > Pages tab > (edit page OPAY) > Page tab > Header and Footer section.
5.2. Add the code shown in the figure below.
When the customer gets to the Invoice screen (INVC), the basket record is converted to an order record. The basket record, along with any custom basket fields, are deleted. However, if you create custom order fields that have the same names as your custom basket fields, the values in the custom basket fields are written to the custom order fields with the same name, and will be saved with the order record. You can then view the custom fields by editing the record.