官术网_书友最值得收藏!

Custom fields – adding customizable product text and charging per letter

Do you want to add custom or customer designed products to your store? What about a greeting in a card to make it personal or a player name on a football shirt? Here is how to do it with custom fields in VirtueMart.

Getting ready

Log in to Joomla! admin and select the VirtueMart component. The example used here is the option to add a custom message on the DVD when giving Joomla! the Movie to a close friend. Not only will they thank you for a life altering movie, but they will also feel like the gift is extra special because of the personal touch.

How to do it...

We will do this in two parts. First creating the custom field and then adding the field to a product.

Creating the custom field:

  1. Select Custom Fields from the Products menu and then click on New. For Custom Field Type select Plugins as shown in the following screenshot:
  2. For Cart Attribute choose Yes as shown in the following screenshot:
  3. In the Description box type Enter your personal message. For Plugin Type choose Customer Text Input from the dropdown. You will now see the following screenshot:
  4. Now in the new fields that have opened up choose Price per letter from the dropdown and in the Title field delete what is in there by default and type Type here.

Adding the custom field to a product:

  1. Click on the Products link in the Products menu and select the product you want to add the chargeable customizable text to.
  2. Click straight on the Product Fields tab. Scroll down and from the dropdown selector choose Type here or whatever you called the custom field as shown in the following screenshot:

    Nearly done. You can alter the maximum size of the message by entering a value in the Size of input field. The only thing you must do is enter a number for the cost per letter. In our example you can see we entered 1.0 which will be 1 of whatever your default currency. If your product is not as prestigious as mine you might like to reduce the cost per letter slightly.

  3. Click on Save and look at the product details page in your shop.

How it works...

Notice that as you type into the message box, the product price automatically increases. And whatever the final price is, when you click on Add to cart, that is what is added. If you ordered the product the message will be part of the invoice and product description, enabling us to make sure we prepare the product correctly before shipping, as shown in the following screenshot:

主站蜘蛛池模板: 开阳县| 陇南市| 蚌埠市| 盐边县| 福州市| 沿河| 类乌齐县| 东安县| 民权县| 廉江市| 响水县| 马龙县| 凭祥市| 温宿县| 宁海县| 桂林市| 富锦市| 赤水市| 琼结县| 武邑县| 夹江县| 沙河市| 襄樊市| 长宁县| 蒙山县| 新龙县| 南开区| 建昌县| 龙井市| 衡东县| 云南省| 自贡市| 仙居县| 莲花县| 临安市| 张北县| 双江| 太谷县| 镇坪县| 怀安县| 垫江县|