--upgrade scripts from nopCommerce 2.30 to nopCommerce 2.40
--new locale resources
declare @resources xml
--a resource will be delete if its value is empty
set @resources='
Check to ignore discounts (sitewide). It can significantly improve performance.
Check to ignore featured products (sitewide). It can significantly improve performance.
Download
Mark as primary weight
Mark as primary dimension
NOTE: if you change your primary weight, then do not forget to update the appropriate ratios of the units
NOTE: if you change your primary dimension, then do not forget to update the appropriate ratios of the units
Mark as default email account
Mark as primary provider
Check
Product thumbnail image size (product page)
The default size (pixels) for product thumbnail images displayed on product details page when you have more than one product image.
Product thumbnail image size (catalog)
The default size (pixels) for product thumbnail images displayed on category or manufacturer pages.
Mobile devices supported
Check to enable mobile devices support.
Add an opportunity for customers to specify signature. Signature will be displayed below each forum post.
{0} Topics
{0} Replies
Config
Languages
Currencies
Tax display type
Home
Desktop store theme
The public store theme for desktops. You can download themes from the extensions page at www.nopcommerce.com.
Mobile store theme
The public store theme for mobile devices. You can download themes from the extensions page at www.nopcommerce.com.
You will receive an e-mail when a new forum topic/post is created.
Delete Selected
Forum/Topic
You are not currently subscribed to any forums
Order ID
Page title SEO adjustment
Select a page title SEO adjustment. For example, generated page title could be (PAGE NAME | YOURSTORE.COM) instead of (YOURSTORE.COM | PAGE NAME).
Page name comes after store name
Store name comes after page name
Payment method: {0}
A list of external authentication identifiers.
Show on registration page
Check to show CAPTCHA on registration page.
Show on contact us page
Check to show CAPTCHA on contact us page.
The product has been added to the cart
Display cart after adding product
If checked, a customer will be taken to the Shopping Cart page immediately after adding a product to their cart. If unchecked, a customer will stay on the same page that they are adding the product to the cart from.
Calculate per weight unit
If you check this option, then rates are multiplied per weight unit (lb, kg, etc). This option is used for the fixed rates (without percents).
Failed to save requirement
Select country
Select country
You can use ECB (European central bank) exchange rate provider only when exchange rate currency code is set to EURO
Login using Facebook account
Login using OpenID account
Please click your account provider
Enter manually your OpenID
Sign In
Login using Twitter account
Manually synchronize nopCommerce newsletter subscribers with MailChimp database
Queue existing newsletter subscribers (run only once)
If sync task period has been changed, please restart the application
Actually configuration is not required. Just some notes:
Ensure that permissions are properly configured on Access Control List page (disabled by default)
To access service use {0}
For mex endpoint use {0}
If you''re using this gateway, ensure that your primary store currency is supported by Authorize.NET.
Use Sandbox
Check to enable Sandbox (testing environment).
Transaction mode
Choose transaction mode
Transaction key
Specify transaction key
Login ID
Specify login identifier.
Additional fee
Enter additional fee to charge your customers.
Use Sandbox
Check to enable Sandbox (testing environment).
Google Vendor ID
Specify Google Vendor ID.
Google Merchant Key
Specify Google Merchant Key.
Authenticate callback
Check to ensure that Google handler callback is authenticated.
Additional fee
Enter additional fee to charge your customers.
After checkout mark payment as
Specify transaction mode.
Use Sandbox
Check to enable Sandbox (testing environment).
Transaction mode
Specify transaction mode.
API Account Name
Specify API account name.
API Account Password
Specify API account password.
Signature
Specify signature.
Additional fee
Enter additional fee to charge your customers.
You will be redirected to PayPal site to complete the order.
Use Sandbox
Check to enable Sandbox (testing environment).
Business Email
Specify your PayPal business email.
PDT Identity Token
Specify PDT identity token
PDT. Validate order total
Check if PDT handler should validate order totals.
Additional fee
Enter additional fee to charge your customers.
Pass product names and order totals to PayPal
Check if product names and order totals should be passed to PayPal.
Enable IPN (Instant Payment Notification)
Check if IPN is enabled.
IPN Handler
Specify IPN Handler.
Leave blank to use the default IPN handler URL.
Gateway URL
Specify gateway URL
Additional handling charge.
Enter additional handling fee to charge your customers.
Shipped from zip
Specify origin zip code.
Add record
Adding a new record
Canada Post URL
Specify Canada Post URL.
Canada Post Port
Specify Canada Post port.
Canada Post Customer ID
Specify Canada Post customer identifier.
URL
Specify FedEx URL.
Key
Specify FedEx key.
Password
Specify FedEx password.
Account number
Specify FedEx account number.
Meter number
Specify FedEx meter number.
Use residential rates
Check to use residential rates.
Use discounted rates
Check to use discounted rates (instead of list rates).
Additional handling charge
Enter additional handling fee to charge your customers.
Carrier Services Offered
Select the services you want to offer to customers.
Shipping origin. Street
Specify origin street.
Shipping origin. City
Specify origin city.
Shipping origin. State code (2 characters)
Specify origin state code (2 characters).
Shipping origin. Zip
Specify origin zip code.
Shipping origin. Country code
Specify origin country code.
Shipping method
Rate
URL
Specify UPS URL.
Access Key
Specify UPS access key.
Username
Specify UPS username.
Password
Specify UPS password.
Additional handling charge
Enter additional handling fee to charge your customers.
Insure package
Check to ensure packages.
UPS Customer Classification
Choose customer classification.
UPS Pickup Type
Choose UPS pickup type.
UPS Packaging Type
Choose UPS packaging type.
Shipped from country
Specify origin country.
Shipped from zip
Specify origin zip code.
Carrier Services
Select the services you want to offer to customers.
URL
Specify USPS URL.
Username
Specify USPS username.
Password
Specify USPS password.
Additional handling charge
Enter additional handling fee to charge your customers.
Shipped from zip
Specify origin zip code.
Domestic Carrier Services
Select the services you want to offer to customers.
International Carrier Services
Select the services you want to offer to customers.
Send
Send test message
Send
Send test message
Add tax rate
Adding a new tax rate
Tax category
Rate
StrikeIron User ID
Specify StrikeIron user identifier.
StrikeIron Password
Specify StrikeIron password.
Test (USA)
Test Online Tax Service (USA)
Zip Code
Specify zip code for testing.
Test (Canada)
Test Online Tax Service (Canada)
Two Letter Province Code
Specify postal code for testing.
Product (Id={0}) cannot be loaded
Product is deleted
Product is not published
Buying is disabled for this product
Wishlist is disabled for this product
Enter valid recipient email
Enter valid recipient name
Enter valid sender email
Enter valid sender name
Product variant (Id={0}) cannot be loaded
Product is not available
Calculate ''X'' including tax
Check to calculate ''X'' value including tax; otherwise excluding tax.
Pass dimensions
Check if you want to pass package dimensions when requesting rates.
Mobile version. Head HTML tag
start HTML tag]]>
Mobile version. Header links
Mobile version. Before content
Mobile version. After content
Mobile version. Footer
end HTML tag]]>
end HTML tag]]>
Update qty
Last name is required.
Guest
Email is required.
You''ll receive a onetime e-mail when this product is available for ordering again. We will not send you any other e-mails or add you to our newsletter; you will only be e-mailed about this product!
Qty
The name of the checkout attribute.
The name of the checkout value.
The name of the product attribute.
The description of the product attribute.
The name of the specification attribute.
The display order of the specification attribute.
The name of the option.
The display order of the option.
The description of the category.
Choose a category template. This template defines how this category (and its products) will be displayed.
The description of the manufacturer.
Choose a manufacturer template. This template defines how this manufacturer (and its products) will be displayed.
The short description of the product. This is the text that displays in product lists i.e. category / manufacturer pages
The full description of the product.
Choose a product template. This template defines how this product (and its variants) will be displayed.
Product tags are keywords that this product can also be identified by. Enter a comma separated list of the tags to be associated with this product. The more products associated with a particular tag, the larger it will show on the tag cloud.
Check to automatically add these product variants to the cart.
The end of the product''s availability in Coordinated Universal Time (UTC).
The start of the product''s availability in Coordinated Universal Time (UTC).
The description of the product variant.
Check if the product has a user agreement.
Set the maximum quantity allowed in a customer''s shopping cart e.g. set to 5 to only allow customers to purchase 5 of this product.
Set the minimum quantity allowed in a customer''s shopping cart e.g. set to 3 to only allow customers to purchase 3 or more of this product.
The Activity Log Type.
Please provide a unique SEO code.
''Recently added products'' enabled
Show customers'' location
A value indicating whether customers'' location is shown.
Show customers'' join date
A value indicating whether to show customers'' join date.
Allow viewing of customer profiles
A value indicating whether the viewing of customer profiles is allowed.
Determines customer registration method. Standard - mode where visitors can register and no approval is required. Email Validation - mode where user must respond to validation email that is sent to them before they are activated. Admin Approval - mode where visitors can register but admin approval is required. Disabled - mode where registration is disabled.
IP addresses allowed to access the Back End. Leave this field empty if you do not want to restrict access to the Back End. Use comma to separate them (e.g. 127.0.0.10,232.18.204.16)
Set a certain number of days that the Return Request Link will be available in the customer area. For example, if the store owner allows returns within 30 days of purchase, they would set this to 30. Logged in customers, viewing orders in ''My Account'', would then not see Return Request buttons for orders completed more than thirty days ago.
A value indicating whether each tax rate should be displayed on a separate line (shopping cart page).
The description of the forum group. This is the description that the customer will see.
The description of the forum. This is the description that the customer will see.
The system keyword for this poll.
Authorization transaction identifier received from your payment gateway.
Capture transaction identifier received from your payment gateway.
Subscription transaction identifier received from your payment gateway.
Downloadable product
The name of the discount.
If checked, a customer must supply a valid coupon code for the discount to be applied.
The payment has been updated successfully.
A value indicating whether we need to find customers without shopping carts/wishlists. If unchecked, then all customers will be found.
Greenwich Mean Time (GMT/UTC)
Greenwich Mean Time (GMT/UTC)
View mobile version
View Full Site
Status
Email is not provided
Password is not provided
Username is not provided
The specified email already exists
The specified username already exists
Email is not entered
Password is not entered
The specified email could not be found
Old password doesn''t match
New email is not valid
E-mail address is too long
The e-mail address is already in use
Username is too long
The username is already in use
Plugins
'
CREATE TABLE #LocaleStringResourceTmp
(
[ResourceName] [nvarchar](200) NOT NULL,
[ResourceValue] [nvarchar](max) NOT NULL
)
INSERT INTO #LocaleStringResourceTmp (ResourceName, ResourceValue)
SELECT nref.value('@Name', 'nvarchar(200)'), nref.value('Value[1]', 'nvarchar(MAX)')
FROM @resources.nodes('//Language/LocaleResource') AS R(nref)
--do it for each existing language
DECLARE @ExistingLanguageID int
DECLARE cur_existinglanguage CURSOR FOR
SELECT [ID]
FROM [Language]
OPEN cur_existinglanguage
FETCH NEXT FROM cur_existinglanguage INTO @ExistingLanguageID
WHILE @@FETCH_STATUS = 0
BEGIN
DECLARE @ResourceName nvarchar(200)
DECLARE @ResourceValue nvarchar(MAX)
DECLARE cur_localeresource CURSOR FOR
SELECT ResourceName, ResourceValue
FROM #LocaleStringResourceTmp
OPEN cur_localeresource
FETCH NEXT FROM cur_localeresource INTO @ResourceName, @ResourceValue
WHILE @@FETCH_STATUS = 0
BEGIN
IF (EXISTS (SELECT 1 FROM [LocaleStringResource] WHERE LanguageID=@ExistingLanguageID AND ResourceName=@ResourceName))
BEGIN
UPDATE [LocaleStringResource]
SET [ResourceValue]=@ResourceValue
WHERE LanguageID=@ExistingLanguageID AND ResourceName=@ResourceName
END
ELSE
BEGIN
INSERT INTO [LocaleStringResource]
(
[LanguageID],
[ResourceName],
[ResourceValue]
)
VALUES
(
@ExistingLanguageID,
@ResourceName,
@ResourceValue
)
END
IF (@ResourceValue is null or @ResourceValue = '')
BEGIN
DELETE [LocaleStringResource]
WHERE LanguageID=@ExistingLanguageID AND ResourceName=@ResourceName
END
FETCH NEXT FROM cur_localeresource INTO @ResourceName, @ResourceValue
END
CLOSE cur_localeresource
DEALLOCATE cur_localeresource
--fetch next language identifier
FETCH NEXT FROM cur_existinglanguage INTO @ExistingLanguageID
END
CLOSE cur_existinglanguage
DEALLOCATE cur_existinglanguage
DROP TABLE #LocaleStringResourceTmp
GO
--Update stored procedure according to new special price properties
IF EXISTS (
SELECT *
FROM sys.objects
WHERE object_id = OBJECT_ID(N'[dbo].[ProductLoadAllPaged]') AND OBJECTPROPERTY(object_id,N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[ProductLoadAllPaged]
GO
CREATE PROCEDURE [dbo].[ProductLoadAllPaged]
(
@CategoryId int = 0,
@ManufacturerId int = 0,
@ProductTagId int = 0,
@FeaturedProducts bit = null, --0 featured only , 1 not featured only, null - load all products
@PriceMin decimal(18, 4) = null,
@PriceMax decimal(18, 4) = null,
@Keywords nvarchar(MAX) = null,
@SearchDescriptions bit = 0,
@FilteredSpecs nvarchar(300) = null, --filter by attributes (comma-separated list). e.g. 14,15,16
@LanguageId int = 0,
@OrderBy int = 0, --0 position, 5 - Name, 10 - Price, 15 - creation date
@PageIndex int = 0,
@PageSize int = 2147483644,
@ShowHidden bit = 0,
@TotalRecords int = null OUTPUT
)
AS
BEGIN
--init
DECLARE @SearchKeywords bit
SET @SearchKeywords = 1
IF (@Keywords IS NULL OR @Keywords = N'')
SET @SearchKeywords = 0
SET @Keywords = isnull(@Keywords, '')
SET @Keywords = '%' + rtrim(ltrim(@Keywords)) + '%'
--filter by attributes
SET @FilteredSpecs = isnull(@FilteredSpecs, '')
CREATE TABLE #FilteredSpecs
(
SpecificationAttributeOptionId int not null
)
INSERT INTO #FilteredSpecs (SpecificationAttributeOptionId)
SELECT CAST(data as int) FROM dbo.[nop_splitstring_to_table](@FilteredSpecs, ',');
DECLARE @SpecAttributesCount int
SELECT @SpecAttributesCount = COUNT(1) FROM #FilteredSpecs
--paging
DECLARE @PageLowerBound int
DECLARE @PageUpperBound int
DECLARE @RowsToReturn int
SET @RowsToReturn = @PageSize * (@PageIndex + 1)
SET @PageLowerBound = @PageSize * @PageIndex
SET @PageUpperBound = @PageLowerBound + @PageSize + 1
CREATE TABLE #DisplayOrderTmp
(
[Id] int IDENTITY (1, 1) NOT NULL,
[ProductId] int NOT NULL
)
INSERT INTO #DisplayOrderTmp ([ProductId])
SELECT p.Id
FROM Product p with (NOLOCK)
LEFT OUTER JOIN Product_Category_Mapping pcm with (NOLOCK) ON p.Id=pcm.ProductId
LEFT OUTER JOIN Product_Manufacturer_Mapping pmm with (NOLOCK) ON p.Id=pmm.ProductId
LEFT OUTER JOIN Product_ProductTag_Mapping pptm with (NOLOCK) ON p.Id=pptm.Product_Id
LEFT OUTER JOIN ProductVariant pv with (NOLOCK) ON p.Id = pv.ProductId
--searching of the localized values
--comment the line below if you don't use it. It'll improve the performance
LEFT OUTER JOIN LocalizedProperty lp with (NOLOCK) ON p.Id = lp.EntityId AND lp.LanguageId = @LanguageId AND lp.LocaleKeyGroup = N'Product'
WHERE
(
(
@CategoryId IS NULL OR @CategoryId=0
OR (pcm.CategoryId=@CategoryId AND (@FeaturedProducts IS NULL OR pcm.IsFeaturedProduct=@FeaturedProducts))
)
AND (
@ManufacturerId IS NULL OR @ManufacturerId=0
OR (pmm.ManufacturerId=@ManufacturerId AND (@FeaturedProducts IS NULL OR pmm.IsFeaturedProduct=@FeaturedProducts))
)
AND (
@ProductTagId IS NULL OR @ProductTagId=0
OR pptm.ProductTag_Id=@ProductTagId
)
AND (
@ShowHidden = 1 OR p.Published = 1
)
AND
(
p.Deleted=0
)
AND
(
@ShowHidden = 1 OR pv.Published = 1
)
AND
(
@ShowHidden = 1 OR pv.Deleted = 0
)
AND (
--min price
(@PriceMin IS NULL OR @PriceMin=0)
OR
(
--special price (specified price and valid date range)
(pv.SpecialPrice IS NOT NULL AND (getutcdate() BETWEEN isnull(pv.SpecialPriceStartDateTimeUtc, '1/1/1900') AND isnull(pv.SpecialPriceEndDateTimeUtc, '1/1/2999')))
AND
(pv.SpecialPrice >= @PriceMin)
)
OR
(
--regular price (price isn't specified or date range isn't valid)
(pv.SpecialPrice IS NULL OR (getutcdate() NOT BETWEEN isnull(pv.SpecialPriceStartDateTimeUtc, '1/1/1900') AND isnull(pv.SpecialPriceEndDateTimeUtc, '1/1/2999')))
AND
(pv.Price >= @PriceMin)
)
)
AND (
--max price
(@PriceMax IS NULL OR @PriceMax=2147483644) -- max value
OR
(
--special price (specified price and valid date range)
(pv.SpecialPrice IS NOT NULL AND (getutcdate() BETWEEN isnull(pv.SpecialPriceStartDateTimeUtc, '1/1/1900') AND isnull(pv.SpecialPriceEndDateTimeUtc, '1/1/2999')))
AND
(pv.SpecialPrice <= @PriceMax)
)
OR
(
--regular price (price isn't specified or date range isn't valid)
(pv.SpecialPrice IS NULL OR (getutcdate() NOT BETWEEN isnull(pv.SpecialPriceStartDateTimeUtc, '1/1/1900') AND isnull(pv.SpecialPriceEndDateTimeUtc, '1/1/2999')))
AND
(pv.Price <= @PriceMax)
)
)
AND (
@SearchKeywords = 0 or
(
-- search standard content
patindex(@Keywords, p.name) > 0
or patindex(@Keywords, pv.name) > 0
or patindex(@Keywords, pv.sku) > 0
or (@SearchDescriptions = 1 and patindex(@Keywords, p.ShortDescription) > 0)
or (@SearchDescriptions = 1 and patindex(@Keywords, p.FullDescription) > 0)
or (@SearchDescriptions = 1 and patindex(@Keywords, pv.Description) > 0)
--searching of the localized values
--comment the lines below if you don't use it. It'll improve the performance
or (lp.LocaleKey = N'Name' and patindex(@Keywords, lp.LocaleValue) > 0)
or (@SearchDescriptions = 1 and lp.LocaleKey = N'ShortDescription' and patindex(@Keywords, lp.LocaleValue) > 0)
or (@SearchDescriptions = 1 and lp.LocaleKey = N'FullDescription' and patindex(@Keywords, lp.LocaleValue) > 0)
)
)
AND
(
@ShowHidden = 1
OR
(getutcdate() between isnull(pv.AvailableStartDateTimeUtc, '1/1/1900') and isnull(pv.AvailableEndDateTimeUtc, '1/1/2999'))
)
AND
(
--filter by specs
@SpecAttributesCount = 0
OR
(
NOT EXISTS(
SELECT 1
FROM #FilteredSpecs [fs]
WHERE [fs].SpecificationAttributeOptionId NOT IN (
SELECT psam.SpecificationAttributeOptionId
FROM dbo.Product_SpecificationAttribute_Mapping psam
WHERE psam.AllowFiltering = 1 AND psam.ProductId = p.Id
)
)
)
)
)
ORDER BY
CASE WHEN @OrderBy = 0 AND @CategoryId IS NOT NULL AND @CategoryId > 0
THEN pcm.DisplayOrder END ASC,
CASE WHEN @OrderBy = 0 AND @ManufacturerId IS NOT NULL AND @ManufacturerId > 0
THEN pmm.DisplayOrder END ASC,
CASE WHEN @OrderBy = 0
THEN p.[Name] END ASC,
CASE WHEN @OrderBy = 5
--THEN dbo.[nop_getnotnullnotempty](pl.[Name],p.[Name]) END ASC,
THEN p.[Name] END ASC,
CASE WHEN @OrderBy = 10
THEN pv.Price END ASC,
CASE WHEN @OrderBy = 15
THEN p.CreatedOnUtc END DESC
DROP TABLE #FilteredSpecs
CREATE TABLE #PageIndex
(
[IndexId] int IDENTITY (1, 1) NOT NULL,
[ProductId] int NOT NULL
)
INSERT INTO #PageIndex ([ProductId])
SELECT ProductId
FROM #DisplayOrderTmp with (NOLOCK)
GROUP BY ProductId
ORDER BY min([Id])
--total records
SET @TotalRecords = @@rowcount
SET ROWCOUNT @RowsToReturn
DROP TABLE #DisplayOrderTmp
--return products (returned properties should be synchronized with 'Product' entity)
SELECT
p.*
FROM
#PageIndex [pi]
INNER JOIN Product p with (NOLOCK) on p.Id = [pi].[ProductId]
WHERE
[pi].IndexId > @PageLowerBound AND
[pi].IndexId < @PageUpperBound
ORDER BY
IndexId
SET ROWCOUNT 0
DROP TABLE #PageIndex
END
GO
--updated AddThis.com sharing code setting
UPDATE [Setting]
SET [Value]= N'
'
WHERE [name] = N'catalogsettings.pagesharecode'
GO
--deleted obsolete settings
DELETE [Setting]
WHERE [name] = N'catalogsettings.hidepricesfornonregistered'
GO
DELETE [Setting]
WHERE [name] = N'shoppingcartsettings.wishlistenabled'
GO
--new setting
IF NOT EXISTS (SELECT 1 FROM [Setting] WHERE [name] = N'mediasettings.productthumbpicturesizeonproductdetailspage')
BEGIN
INSERT [Setting] ([Name], [Value])
VALUES (N'mediasettings.productthumbpicturesizeonproductdetailspage', N'70')
END
GO
--mobile devices support
IF NOT EXISTS (SELECT 1 FROM [Setting] WHERE [name] = N'storeinformationsettings.mobiledevicessupported')
BEGIN
INSERT [Setting] ([Name], [Value])
VALUES (N'storeinformationsettings.mobiledevicessupported', N'false')
END
GO
IF NOT EXISTS (SELECT 1 FROM [Setting] WHERE [name] = N'storeinformationsettings.defaultstorethemeformobiledevices')
BEGIN
INSERT [Setting] ([Name], [Value])
VALUES (N'storeinformationsettings.defaultstorethemeformobiledevices', N'Mobile')
END
GO
UPDATE [CustomerAttribute]
SET [Key] = N'WorkingDesktopThemeName'
WHERE [Key] = N'WorkingThemeName'
GO
IF NOT EXISTS (SELECT 1 FROM [Setting] WHERE [name] = N'storeinformationsettings.defaultstorethemefordesktops')
BEGIN
UPDATE [Setting]
SET [Name] = N'storeinformationsettings.defaultstorethemefordesktops'
WHERE [Name] = N'storeinformationsettings.defaultstoretheme'
END
GO
--new setting
IF NOT EXISTS (SELECT 1 FROM [Setting] WHERE [name] = N'storeinformationsettings.emulatemobiledevice')
BEGIN
INSERT [Setting] ([Name], [Value])
VALUES (N'storeinformationsettings.emulatemobiledevice', N'false')
END
GO
--new setting
IF NOT EXISTS (SELECT 1 FROM [Setting] WHERE [name] = N'paymentsettings.bypasspaymentmethodselectionifonlyone')
BEGIN
INSERT [Setting] ([Name], [Value])
VALUES (N'paymentsettings.bypasspaymentmethodselectionifonlyone', N'true')
END
GO
--new setting
IF NOT EXISTS (SELECT 1 FROM [Setting] WHERE [name] = N'catalogsettings.defaultviewmode')
BEGIN
INSERT [Setting] ([Name], [Value])
VALUES (N'catalogsettings.defaultviewmode', N'grid')
END
GO
--new setting
IF NOT EXISTS (SELECT 1 FROM [Setting] WHERE [name] = N'catalogsettings.defaultproductratingvalue')
BEGIN
INSERT [Setting] ([Name], [Value])
VALUES (N'catalogsettings.defaultproductratingvalue', N'5')
END
GO
--new setting
IF NOT EXISTS (SELECT 1 FROM [Setting] WHERE [name] = N'seosettings.pagetitleseoadjustment')
BEGIN
INSERT [Setting] ([Name], [Value])
VALUES (N'seosettings.pagetitleseoadjustment', N'0')
END
GO
--missed 'Upload Pictures' permission record
IF NOT EXISTS (
SELECT 1
FROM [dbo].[PermissionRecord]
WHERE [SystemName] = N'UploadPictures')
BEGIN
INSERT [dbo].[PermissionRecord] ([Name], [SystemName], [Category])
VALUES (N'Admin area. Upload Pictures', N'UploadPictures', N'Configuration')
DECLARE @PermissionRecordId INT
SET @PermissionRecordId = @@IDENTITY
--add it to admin role be default
DECLARE @AdminCustomerRoleId int
SELECT @AdminCustomerRoleId = Id
FROM [CustomerRole]
WHERE IsSystemRole=1 and [SystemName] = N'Administrators'
INSERT [dbo].[PermissionRecord_Role_Mapping] ([PermissionRecord_Id], [CustomerRole_Id])
VALUES (@PermissionRecordId, @AdminCustomerRoleId)
END
GO
--new CAPTCHA settings
IF NOT EXISTS (SELECT 1 FROM [Setting] WHERE [name] = N'captchasettings.showonregistrationpage')
BEGIN
INSERT [Setting] ([Name], [Value])
VALUES (N'captchasettings.showonregistrationpage', N'true')
END
GO
--new CAPTCHA settings
IF NOT EXISTS (SELECT 1 FROM [Setting] WHERE [name] = N'captchasettings.showoncontactuspage')
BEGIN
INSERT [Setting] ([Name], [Value])
VALUES (N'captchasettings.showoncontactuspage', N'false')
END
GO
--new setting
IF NOT EXISTS (SELECT 1 FROM [Setting] WHERE [name] = N'shoppingcartsettings.displaycartafteraddingproduct')
BEGIN
INSERT [Setting] ([Name], [Value])
VALUES (N'shoppingcartsettings.displaycartafteraddingproduct', N'true')
END
GO
--new setting
IF NOT EXISTS (SELECT 1 FROM [Setting] WHERE [name] = N'catalogsettings.includefeaturedproductsinnormallists')
BEGIN
INSERT [Setting] ([Name], [Value])
VALUES (N'catalogsettings.includefeaturedproductsinnormallists', N'false')
END
GO
--new 'Allow Customer Impersonation' permission record
IF NOT EXISTS (
SELECT 1
FROM [dbo].[PermissionRecord]
WHERE [SystemName] = N'AllowCustomerImpersonation')
BEGIN
INSERT [dbo].[PermissionRecord] ([Name], [SystemName], [Category])
VALUES (N'Admin area. Allow Customer Impersonation', N'AllowCustomerImpersonation', N'Customers')
DECLARE @PermissionRecordId INT
SET @PermissionRecordId = @@IDENTITY
--add it to admin role be default
DECLARE @AdminCustomerRoleId int
SELECT @AdminCustomerRoleId = Id
FROM [CustomerRole]
WHERE IsSystemRole=1 and [SystemName] = N'Administrators'
INSERT [dbo].[PermissionRecord_Role_Mapping] ([PermissionRecord_Id], [CustomerRole_Id])
VALUES (@PermissionRecordId, @AdminCustomerRoleId)
END
GO
--new setting
IF NOT EXISTS (SELECT 1 FROM [Setting] WHERE [name] = N'shippingsettings.freeshippingoverxincludingtax')
BEGIN
INSERT [Setting] ([Name], [Value])
VALUES (N'shippingsettings.freeshippingoverxincludingtax', N'false')
END
GO
--new setting
IF NOT EXISTS (SELECT 1 FROM [Setting] WHERE [name] = N'fedexsettings.passdimensions')
BEGIN
INSERT [Setting] ([Name], [Value])
VALUES (N'fedexsettings.passdimensions', N'false')
END
GO
--'Keep alive' schedule task
IF NOT EXISTS (
SELECT 1
FROM [dbo].[ScheduleTask]
WHERE [Name] = N'Keep alive')
BEGIN
INSERT [dbo].[ScheduleTask] ([Name], [Seconds], [Type], [Enabled], [StopOnError])
VALUES (N'Keep alive', 300, N'Nop.Services.Common.KeepAliveTask, Nop.Services', 1, 0)
END
GO
--clear serialized shipping options
DELETE FROM CustomerAttribute
WHERE [Key] like N'LastShippingOption'
GO