Page 1 of 1

New Ecommerce Legislation

Posted: Fri Nov 28, 2008 5:18 pm
by Tomgard
The new Federal Hazardous Substances Act requires that ecommerce sites selling products for children include a cautionary statement on those products comprised of small parts, balls and/or balloons which present a choking or suffocation hazard to children. Initially I was going to begin to modify all of my descriptions but got to thinking it may be better to look at modifying or customizing the product 'Basic Info' options since this will be an ongoing issue and should be treated equally as a product SKU or Name.

In my opinion, tying a check box to a graphical 'warning' upon the item display would be idea.

Has anyone already addressed this issue? Or, does anyone have any suggestions?

Thanks! (Beginning Dec 12, 2008, all web-based advertising will be required to comply with the new rules)

Re: New Ecommerce Legislation

Posted: Sat Nov 29, 2008 2:35 am
by mazhar
You can keep a custom flag information with products. Then you need to create some way to respond against this information on store side. I have tried a quick fix for it. The attached code contains the moddified files of EditProduct page and one new ConLib control to show the warning. Take a backup of your existing EditProduct page files (.aspx and .cs) and try these new ones. Place the ShowWarning control in conlib and give then use this control on the product details page. Enabling the warning for a product will make a message appear on the product details page.

Re: New Ecommerce Legislation

Posted: Thu Dec 04, 2008 11:23 am
by mkeith1
will there be a True/false field for "Enable Warning" added to the dataport?

Re: New Ecommerce Legislation

Posted: Thu Dec 04, 2008 11:29 am
by mazhar
You can try it with latest dataport to check this.

Re: New Ecommerce Legislation

Posted: Thu Dec 04, 2008 11:47 am
by mazhar
You can found the EditProduct.aspx and EditProduct.aspx.cs files in the following directory
Website\Admin\Products.

Re: New Ecommerce Legislation

Posted: Thu Dec 04, 2008 5:11 pm
by Tomgard
This control seems to work just fine. How would i call up an image rather than text?

Re: New Ecommerce Legislation

Posted: Thu Dec 04, 2008 7:03 pm
by Tomgard
will there be a True/false field for "Enable Warning" added to the dataport?
I am using DP 1.0.0.31 and it does not look like the Dataport recognizes this new field. That would be ideal.

Re: New Ecommerce Legislation

Posted: Sat Dec 06, 2008 5:38 am
by mazhar
Put the your image for example warning.gif under the current themes images folder. Then edit the style.skin file of the current theme and add following line to it

Code: Select all

<asp:Image runat="server" SkinId="WarningImage" ImageUrl="images/warning.gif" />
Now modify the ShowWarning.ascx file and change its

Code: Select all

<blink>
<asp:Label ID="ShowWarningLabel" runat="server" Text="You warning text here..." Font-Size="Large" ForeColor="red"></asp:Label>
</blink>
to

Code: Select all

<asp:Image ID="WarningImage" SkinID="WarningImage" runat="server" />

Re: New Ecommerce Legislation

Posted: Mon Dec 08, 2008 11:25 am
by Tomgard
I have found one potential issue with this new code. Any time that I edit an exsiting item and the warning code box is NOT checked it will now show a ' IsWarning: False ' in the body of the product description on the shopping cart side. See the following link for an example.
http://www.schoolsupplystore.com/Telly- ... 38872.aspx

Re: New Ecommerce Legislation

Posted: Thu Dec 11, 2008 7:04 am
by mazhar
I have found one potential issue with this new code. Any time that I edit an exsiting item and the warning code box is NOT checked it will now show a ' IsWarning: False ' in the body of the product description on the shopping cart side. See the following link for an example.
Got it! This is becasuse the product descriptoin control also lists the custom fileds for the product. In order to hide this we need to update the ConLib/ProductCustomFieldsDialog control so that it doesn't list the warning field info. Edit the ConLib/ProductCustomFieldsDialog and locate the following code

Code: Select all

if (!string.IsNullOrEmpty(cf.FieldValue))
and make it look like

Code: Select all

if (!string.IsNullOrEmpty(cf.FieldValue) && cf.FieldName != "IsWarning")

Re: New Ecommerce Legislation

Posted: Thu Dec 11, 2008 11:29 am
by Tomgard
That fix worked perfect! Thank you.

Re: New Ecommerce Legislation

Posted: Thu Dec 11, 2008 11:31 am
by Tomgard
Following your instructions to insert an image rather than text I am stumbling somewhere.

Does it matter where this line of code is put in the Theme folder?
Then edit the style.skin file of the current theme and add following line to it

Code:
<asp:Image runat="server" SkinId="WarningImage" ImageUrl="images/warning.gif" />

Re: New Ecommerce Legislation

Posted: Fri Dec 12, 2008 3:56 am
by mazhar
Edit the style.skin file from your current store theme. Then put that line of code at the very end of the file and save it. After that make sure that warning.gif image is in the images folder of current theme.

The path for skin file: App_Themes/[Your Theme Folder]/style.skin
The path for image file: App_Themes/[Your Theme Folder]/images/warning.gif

Re: New Ecommerce Legislation

Posted: Fri Dec 12, 2008 11:28 am
by mazhar
One more thing after removing the ShowWarningLabel from HTML don't forget to remove the following line of code as well.

Code: Select all

ShowWarningLabel.Visible = showWarning;

Re: New Ecommerce Legislation

Posted: Mon Dec 22, 2008 10:03 am
by jmestep
One more note: After you remove
ShowWarningLabel.Visible = showWarning;

you need to add this in it's place:
WarningImage.Visible = showWarning;