Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsStoreStoreWidth of model name fieldWidth of model name field
Previous
 
Next
New Post
9/15/2008 12:11 AM
 

Is there a way to increase the width of the model name field without changing the source code?

 
New Post
9/17/2008 4:59 AM
 

1.Change database column width (to 150 symbols for this example): 

ALTER TABLE dbo.store_products ALTER COLUMN ModelName nvarchar(150)

2.Change stored procedure dbo.Store_Products_AddProduct(). In ver 02.01.00 it's:

ALTER PROCEDURE dbo.Store_Products_AddProduct @PortalID int, @CategoryID int, @Manufacturer nvarchar(50), @ModelNumber nvarchar(50), @ModelName nvarchar(150), @ProductImage nvarchar(500), @UnitCost money, @Summary nvarchar(1000), @Description ntext, @Featured bit, @Archived bit, @CreatedByUser nvarchar(100), @CreatedDate datetime, @Weight decimal(10,2), @Height decimal(10,2), @Length decimal(10,2), @Width decimal(10,2), @SaleStartDate datetime = null, @SaleEndDate datetime = null, @SalePrice money = null AS SET NOCOUNT ON IF @Weight < 0 BEGIN SET @Weight = NULL END IF @SaleStartDate = '01/01/9999' BEGIN SET @SaleStartDate = NULL END IF @SaleEndDate = '01/01/9999' BEGIN SET @SaleEndDate = NULL END IF @SalePrice < 0 BEGIN SET @SalePrice = NULL END INSERT INTO dbo.Store_Products (PortalID,CategoryID,Manufacturer,ModelNumber,ModelName,ProductImage,UnitCost,Summary,Description,Featured,Archived,CreatedByUser,CreatedDate,ProductWeight,ProductHeight,ProductLength,ProductWidth,SaleStartDate,SaleEndDate,SalePrice) VALUES (@PortalID,@CategoryID,@Manufacturer,@ModelNumber,@ModelName,@ProductImage,@UnitCost,@Summary,@Description,@Featured,@Archived,@CreatedByUser,@CreatedDate,@Weight,@Height,@Length,@Width,@SaleStartDate,@SaleEndDate,@SalePrice) SELECT SCOPE_IDENTITY()

3.Change MaxLength in "DesktopModules\Store\ProductEdit.ascx".

Not thoroughly tested, but seems to be working OK.

 
New Post
9/18/2008 2:18 AM
 

4.Also:

ALTER PROCEDURE dbo.Store_Products_UpdateProduct @ProductID int, @CategoryID int, @Manufacturer nvarchar(50), @ModelNumber nvarchar(50), @ModelName nvarchar(150), @ProductImage nvarchar(500), @UnitCost money, @Summary nvarchar(1000), @Description ntext, @Featured bit, @Archived bit, @Weight decimal(10,2), @Height decimal(10,2), @Length decimal(10,2), @Width decimal(10,2), @SaleStartDate datetime = null, @SaleEndDate datetime = null, @SalePrice money = null AS SET NOCOUNT ON IF @Weight < 0 BEGIN SET @Weight = NULL END IF @Height < 0 BEGIN SET @Height = NULL END IF @Length < 0 BEGIN SET @Length = NULL END IF @Width < 0 BEGIN SET @Width = NULL END IF @SalePrice < 0 BEGIN SET @SalePrice = NULL END IF @SaleStartDate = '01/01/9999' BEGIN SET @SaleStartDate = NULL END IF @SaleEndDate = '01/01/9999' BEGIN SET @SaleEndDate = NULL END UPDATE dbo.Store_Products SET CategoryID=@CategoryID, Manufacturer=@Manufacturer, ModelNumber=@ModelNumber, ModelName=@ModelName, ProductImage=@ProductImage, UnitCost=@UnitCost, Summary=@Summary, Description=@Description, Featured=@Featured, Archived=@Archived, ProductWeight = @Weight, ProductHeight = @Height, ProductLength = @Length, ProductWidth = @Width, SaleStartDate = @SaleStartDate, SaleEndDate = @SaleEndDate, SalePrice = @SalePrice WHERE ProductID=@ProductID

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsStoreStoreWidth of model name fieldWidth of model name field


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out