744 users online

Product Specification Value Mod


This allows you to create product specifications that do not have set values like Watts, Weight, Dimensions etc.
Supported Versions: nopCommerce 1.90
Author: Keith

Download    (110 Downloads)

This product Specification Value Mod Adds a Value field to the Nop_Product_SpecificationAttribute_Mapping table and associated classes.  This allows you to create product specifications that do not have set values like Watts, Weight, Dimensions etc.. The mod still allows you to set Specification Options the way it was initially designed by using predetermined values.

When you create a Product Specification from the Catalog/Attributes/Product Specification screen in admin you name your specification such as Watts and then you add a new Specification Attribute Option and name it "Value" ( this triggers the ProductSpecification module in the front end to get the value from the mapping table instead of the attribute option table)

Then in Catalog/Products/Manage Products Edit product details and the Product Specification tab you select your new specification attribute and set the Attribute option to Value.  Now in the value field you can enter your custom value.

In the File Modules/ProductSpecifications.ascx and .cs,  I added rptrProductSpecification_DataBound for the repeater which will check the value of the SpecificationAttributeOption.Name and if its equal to "Value" then the custom value field will be used,  If not then it displays the SpecificationAttributeOption.Name the normal way.   I did it this was so i can use different triggers to be used such as Image, to show a image as a spec or link.

Starting at the v180 update I added other fields in addition to Value. ProductSpecifications.ascx.cs uses a switch statement to display the proper spec type.  you can customize this part to fit your needs exactly.

1) Value - custom value

2) Image - url to a image that is displayed

3) File - link to a file

4) Html - raw html inserted into a label control

These changes will show on both product templates since they are done at the specification module level.

The Product Specification filter has not been modified to support these custom values so allow filtering needs to be turned off

The product export and the product copy have been modified to support the new value field.

For the file value,  if you look at modules/ProductSpecifications.ascx.cs around line 102 youll see that you can add different file icons to be displayed before the file name for different file extensions.



Current rating is 4.50. Total votes 2.
 
Reviews
Nice one but one problem
I followed exactly same way but when I tried to save a value from admin area then it won't save into database, Could you please tell me where am I doing wrong?

Thanks
Hitesh

From: hiteshsakshi | Created on: 3/17/2012 1:43 AM

Was this review helpful? Yes  No (0 / 0)
Amazing !!
It is amazing how it works. Check it in:

http://www.edcorusa.com/products/98-mx1.aspx

Then view similar products with the Compare feature

From: eadameg | Created on: 4/5/2011 5:21 PM

Was this review helpful? Yes  No (1 / 0)
AMAZING!!!
Thankyou sooo much, this saved me alot of time and trouble of having to do this code myself.

From: dfwitdepartment | Created on: 2/21/2011 1:58 PM

Was this review helpful? Yes  No (1 / 0)
Very good
woh addon very good

From: quocnamle | Created on: 1/8/2011 7:54 PM

Was this review helpful? Yes  No (1 / 0)
Great Add-in
Exactly what we need.  Great!

From: mndang | Created on: 1/6/2011 12:07 PM

Was this review helpful? Yes  No (3 / 0)
Great feature. Highly recommended
With MOD you can add custom fields to products.
Great extension and highly recommended for all

From: eadameg | Created on: 12/23/2010 10:57 AM

Was this review helpful? Yes  No (5 / 0)