Skip to content

Commit 3165e76

Browse files
committed
v4.1.11
1 parent 3d79947 commit 3165e76

File tree

6 files changed

+44
-99
lines changed

6 files changed

+44
-99
lines changed

Components/Product/ProductData.cs

Lines changed: 2 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -2007,73 +2007,10 @@ public int Validate()
20072007
return errorcount;
20082008
}
20092009

2010+
[Obsolete("The Copy function has been removed. it did not work correctly, but has been left in the code for possible compatibility with plugins.")]
20102011
public int Copy()
20112012
{
2012-
var objCtrl = new NBrightBuyController();
2013-
2014-
//Copy Base record
2015-
var dr = (NBrightInfo)DataRecord.Clone();
2016-
dr.ItemID = -1;
2017-
dr.SetXmlProperty("genxml/importref", Utils.GetUniqueKey());
2018-
var newid = objCtrl.Update(dr);
2019-
2020-
// copy all language records
2021-
var l = objCtrl.GetList(_portalId, -1, _typeLangCode, " and NB1.ParentItemId = " + Info.ItemID.ToString(""));
2022-
foreach (var dlr in l)
2023-
{
2024-
dlr.ParentItemId = newid;
2025-
dlr.ItemID = -1;
2026-
objCtrl.Update(dlr);
2027-
}
2028-
2029-
// copy CATXREF records
2030-
l = objCtrl.GetList(_portalId, -1, "CATXREF", " and NB1.ParentItemId = " + Info.ItemID.ToString(""));
2031-
foreach (var dr1 in l)
2032-
{
2033-
dr1.ParentItemId = newid;
2034-
dr1.ItemID = -1;
2035-
dr1.GUIDKey = dr1.GUIDKey.Replace("x" + Info.ItemID.ToString(""), "x" + newid.ToString(""));
2036-
objCtrl.Update(dr1);
2037-
}
2038-
2039-
// copy CATCASCADE records
2040-
l = objCtrl.GetList(_portalId, -1, "CATCASCADE", " and NB1.ParentItemId = " + Info.ItemID.ToString(""));
2041-
foreach (var dr2 in l)
2042-
{
2043-
dr2.ParentItemId = newid;
2044-
dr2.ItemID = -1;
2045-
dr2.GUIDKey = dr2.GUIDKey.Replace("x" + Info.ItemID.ToString(""), "x" + newid.ToString(""));
2046-
objCtrl.Update(dr2);
2047-
}
2048-
2049-
// copy PRDXREF records
2050-
l = objCtrl.GetList(_portalId, -1, _typeCode + "XREF", " and NB1.ParentItemId = " + Info.ItemID.ToString(""));
2051-
foreach (var dr3 in l)
2052-
{
2053-
dr3.ParentItemId = newid;
2054-
dr3.ItemID = -1;
2055-
dr3.GUIDKey = dr3.GUIDKey.Replace("x" + Info.ItemID.ToString(""), "x" + newid.ToString(""));
2056-
objCtrl.Update(dr3);
2057-
2058-
// create bi-directional relationship
2059-
var newXrefId = dr3.ParentItemId; var newParentItemId = dr3.XrefItemId;
2060-
dr3.ParentItemId = newParentItemId;
2061-
dr3.XrefItemId = newXrefId;
2062-
dr3.GUIDKey = newid.ToString("") + "x" + dr3.GUIDKey.Replace("x" + newid.ToString(""), "");
2063-
objCtrl.Update(dr3);
2064-
}
2065-
2066-
// copy USERPRDXREF records
2067-
l = objCtrl.GetList(_portalId, -1, "USERPRDXREF", " and NB1.ParentItemId = " + Info.ItemID.ToString(""));
2068-
foreach (var dr4 in l)
2069-
{
2070-
dr4.ParentItemId = newid;
2071-
dr4.ItemID = -1;
2072-
dr4.GUIDKey = dr4.GUIDKey.Replace("x" + Info.ItemID.ToString(""), "x" + newid.ToString(""));
2073-
objCtrl.Update(dr4);
2074-
}
2075-
2076-
return newid;
2013+
return -999;
20772014
}
20782015

20792016
public void FillEmptyLanguageFields()

Components/Product/ProductFunctions.cs

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ public String ProductAdminSaveAs(HttpContext context)
246246
{
247247
try
248248
{
249-
ProductSave(context, true);
249+
ProductSave(context, true, true);
250250
return "";
251251
}
252252
catch (Exception ex)
@@ -296,7 +296,15 @@ public String ProductAdminSave(HttpContext context)
296296
}
297297
}
298298

299-
public int ProductSave(HttpContext context, bool newrecord = false)
299+
public int ProductSave(HttpContext context)
300+
{
301+
return ProductSave(context, false, false);
302+
}
303+
public int ProductSave(HttpContext context, bool newrecord)
304+
{
305+
return ProductSave(context, newrecord, false);
306+
}
307+
public int ProductSave(HttpContext context, bool newrecord, bool copyproduct)
300308
{
301309
if (NBrightBuyUtils.CheckRights())
302310
{
@@ -330,14 +338,14 @@ public int ProductSave(HttpContext context, bool newrecord = false)
330338

331339
prdData.Update(productXml);
332340

333-
if (newrecord) prdData.DataLangRecord.SetXmlProperty("genxml/textbox/txtproductname", prdData.ProductName + " - Copy");
341+
if (copyproduct) prdData.DataLangRecord.SetXmlProperty("genxml/textbox/txtproductname", prdData.ProductName + " - Copy");
334342

335343
prdData.Save(true,newrecord);
336344

337345
ProductUtils.CreateFriendlyImages(prdData.DataRecord.ItemID, EditLangCurrent);
338346

339347
// Copy Categories, properties, related products, members.
340-
if (newrecord)
348+
if (copyproduct)
341349
{
342350
var originalItemId = ajaxInfo.GetXmlPropertyInt("genxml/hidden/itemid");
343351
var originalPrdData = new ProductData(originalItemId, EditLangCurrent, true, EntityTypeCode);

DNNpackager.dnnpack

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<root>
2-
<version>4.1.10</version>
2+
<version>4.1.11</version>
33
<websitedestrelpath>\DesktopModules\NBright\NBrightBuy</websitedestrelpath>
44
<websitedestbinrelpath>\bin</websitedestbinrelpath>
55
<!-- Include only files that match the regular expression -->

OpenStore.dnn

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<dotnetnuke type="Package" version="5.0">
22
<packages>
33

4-
<package name="OS_ProductView" type="Module" version="4.1.10">
4+
<package name="OS_ProductView" type="Module" version="4.1.11">
55
<friendlyName>OS_ProductView</friendlyName>
66
<description>
77
OpenStore open source e-commerce for DNN.
@@ -116,7 +116,7 @@
116116
- Merge branch 'feature/170-product-validaton' into develop
117117
- Merge branch 'bugfix/195-product-options-as-radio' into develop
118118
- Merge remote-tracking branch 'remotes/origin-OpenStore/bugfix/198-default-sorting' into develop
119-
- CopyCart Fix v4.1.10
119+
- CopyCart Fix v4.1.11
120120
- Minicart link fix
121121
- Fix models status stock level checks
122122
- add weight to the order
@@ -258,7 +258,7 @@
258258
</package>
259259

260260

261-
<package name="OpenStoreBO" type="Skin" version="4.1.10">
261+
<package name="OpenStoreBO" type="Skin" version="4.1.11">
262262
<friendlyName>OpenStoreBO</friendlyName>
263263
<description>
264264
OpenStore Admin Panel
@@ -304,7 +304,7 @@
304304

305305

306306

307-
<package name="OS_DisplaySearch" type="Module" version="4.1.10">
307+
<package name="OS_DisplaySearch" type="Module" version="4.1.11">
308308
<friendlyName>OS_DisplaySearch</friendlyName>
309309
<description>
310310
OpenStore open source e-commerce for DNN.
@@ -385,7 +385,7 @@
385385
</components>
386386
</package>
387387

388-
<package name="OS_AddressAdmin" type="Module" version="4.1.10">
388+
<package name="OS_AddressAdmin" type="Module" version="4.1.11">
389389
<friendlyName>OS_AddressAdmin</friendlyName>
390390
<description>OpenStore open source e-commerce for DNN.
391391
Admin for clients addresses from the front office.
@@ -460,7 +460,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
460460
</components>
461461
</package>
462462

463-
<package name="OS_Payment" type="Module" version="4.1.10">
463+
<package name="OS_Payment" type="Module" version="4.1.11">
464464
<friendlyName>OS_Payment</friendlyName>
465465
<description>OpenStore open source e-commerce for DNN.
466466
Process payment of orders.
@@ -534,7 +534,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
534534
</components>
535535
</package>
536536

537-
<package name="OS_OrderAdmin" type="Module" version="4.1.10">
537+
<package name="OS_OrderAdmin" type="Module" version="4.1.11">
538538

539539
<friendlyName>OS_OrderAdmin</friendlyName>
540540
<description>OpenStore open source e-commerce for DNN.
@@ -610,7 +610,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
610610
</components>
611611
</package>
612612

613-
<package name="OS_ProfileForm" type="Module" version="4.1.10">
613+
<package name="OS_ProfileForm" type="Module" version="4.1.11">
614614
<friendlyName>OS_ProfileForm</friendlyName>
615615
<description>OpenStore open source e-commerce for DNN.
616616
This module creates a profile form that links to the DNN profile and NBS address.
@@ -686,7 +686,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
686686
</package>
687687

688688

689-
<package name="OS_Checkout" type="Module" version="4.1.10">
689+
<package name="OS_Checkout" type="Module" version="4.1.11">
690690
<friendlyName>OS_Checkout</friendlyName>
691691
<description>OpenStore open source e-commerce for DNN. Checkout process.
692692
</description>
@@ -760,7 +760,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
760760
</components>
761761
</package>
762762

763-
<package name="OS_MiniCart" type="Module" version="4.1.10">
763+
<package name="OS_MiniCart" type="Module" version="4.1.11">
764764
<friendlyName>OS_MiniCart</friendlyName>
765765
<description>OpenStore open source e-commerce for DNN. Mini cart view.
766766
</description>
@@ -834,7 +834,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
834834
</components>
835835
</package>
836836

837-
<package name="OS_FullCart" type="Module" version="4.1.10">
837+
<package name="OS_FullCart" type="Module" version="4.1.11">
838838
<friendlyName>OS_FullCart</friendlyName>
839839
<description>OpenStore open source e-commerce for DNN. full cart view.
840840
</description>
@@ -908,7 +908,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
908908
</components>
909909
</package>
910910

911-
<package name="OS_CategoryMenu" type="Module" version="4.1.10">
911+
<package name="OS_CategoryMenu" type="Module" version="4.1.11">
912912
<friendlyName>OS_CategoryMenu</friendlyName>
913913
<description>
914914
CategoryMenu Display
@@ -980,7 +980,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
980980
</components>
981981
</package>
982982

983-
<package name="OS_ProductFilter" type="Module" version="4.1.10">
983+
<package name="OS_ProductFilter" type="Module" version="4.1.11">
984984
<friendlyName>OS_ProductFilter</friendlyName>
985985
<description>
986986
Filter module for Ajax Product Display
@@ -1053,7 +1053,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
10531053
</components>
10541054
</package>
10551055

1056-
<package name="OS_ItemList" type="Module" version="4.1.10">
1056+
<package name="OS_ItemList" type="Module" version="4.1.11">
10571057
<friendlyName>OS_ItemList</friendlyName>
10581058
<description>
10591059
Itemlist admin for shopping/favorites list

OpenStoreUpgrade.dnn

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<dotnetnuke type="Package" version="5.0">
22
<packages>
33

4-
<package name="OS_ProductView" type="Module" version="4.1.10">
4+
<package name="OS_ProductView" type="Module" version="4.1.11">
55
<friendlyName>OS_ProductView</friendlyName>
66
<description>
77
OpenStore open source e-commerce for DNN.
@@ -114,7 +114,7 @@
114114
- Merge branch 'feature/170-product-validaton' into develop
115115
- Merge branch 'bugfix/195-product-options-as-radio' into develop
116116
- Merge remote-tracking branch 'remotes/origin-OpenStore/bugfix/198-default-sorting' into develop
117-
- CopyCart Fix v4.1.10
117+
- CopyCart Fix v4.1.11
118118
- Minicart link fix
119119
- Fix models status stock level checks
120120
- add weight to the order
@@ -255,7 +255,7 @@
255255
</components>
256256
</package>
257257

258-
<package name="OS_DisplaySearch" type="Module" version="4.1.10">
258+
<package name="OS_DisplaySearch" type="Module" version="4.1.11">
259259
<friendlyName>OS_DisplaySearch</friendlyName>
260260
<description>
261261
OpenStore open source e-commerce for DNN.
@@ -336,7 +336,7 @@
336336
</components>
337337
</package>
338338

339-
<package name="OS_AddressAdmin" type="Module" version="4.1.10">
339+
<package name="OS_AddressAdmin" type="Module" version="4.1.11">
340340
<friendlyName>OS_AddressAdmin</friendlyName>
341341
<description>OpenStore open source e-commerce for DNN.
342342
Admin for clients addresses from the front office.
@@ -411,7 +411,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
411411
</components>
412412
</package>
413413

414-
<package name="OS_Payment" type="Module" version="4.1.10">
414+
<package name="OS_Payment" type="Module" version="4.1.11">
415415
<friendlyName>OS_Payment</friendlyName>
416416
<description>OpenStore open source e-commerce for DNN.
417417
Process payment of orders.
@@ -485,7 +485,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
485485
</components>
486486
</package>
487487

488-
<package name="OS_OrderAdmin" type="Module" version="4.1.10">
488+
<package name="OS_OrderAdmin" type="Module" version="4.1.11">
489489

490490
<friendlyName>OS_OrderAdmin</friendlyName>
491491
<description>OpenStore open source e-commerce for DNN.
@@ -561,7 +561,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
561561
</components>
562562
</package>
563563

564-
<package name="OS_ProfileForm" type="Module" version="4.1.10">
564+
<package name="OS_ProfileForm" type="Module" version="4.1.11">
565565
<friendlyName>OS_ProfileForm</friendlyName>
566566
<description>OpenStore open source e-commerce for DNN.
567567
This module creates a profile form that links to the DNN profile and NBS address.
@@ -637,7 +637,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
637637
</package>
638638

639639

640-
<package name="OS_Checkout" type="Module" version="4.1.10">
640+
<package name="OS_Checkout" type="Module" version="4.1.11">
641641
<friendlyName>OS_Checkout</friendlyName>
642642
<description>OpenStore open source e-commerce for DNN. Checkout process.
643643
</description>
@@ -711,7 +711,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
711711
</components>
712712
</package>
713713

714-
<package name="OS_MiniCart" type="Module" version="4.1.10">
714+
<package name="OS_MiniCart" type="Module" version="4.1.11">
715715
<friendlyName>OS_MiniCart</friendlyName>
716716
<description>OpenStore open source e-commerce for DNN. Mini cart view.
717717
</description>
@@ -785,7 +785,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
785785
</components>
786786
</package>
787787

788-
<package name="OS_FullCart" type="Module" version="4.1.10">
788+
<package name="OS_FullCart" type="Module" version="4.1.11">
789789
<friendlyName>OS_FullCart</friendlyName>
790790
<description>OpenStore open source e-commerce for DNN. full cart view.
791791
</description>
@@ -859,7 +859,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
859859
</components>
860860
</package>
861861

862-
<package name="OS_CategoryMenu" type="Module" version="4.1.10">
862+
<package name="OS_CategoryMenu" type="Module" version="4.1.11">
863863
<friendlyName>OS_CategoryMenu</friendlyName>
864864
<description>
865865
CategoryMenu Display
@@ -931,7 +931,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
931931
</components>
932932
</package>
933933

934-
<package name="OS_ProductFilter" type="Module" version="4.1.10">
934+
<package name="OS_ProductFilter" type="Module" version="4.1.11">
935935
<friendlyName>OS_ProductFilter</friendlyName>
936936
<description>
937937
Filter module for Ajax Product Display
@@ -1004,7 +1004,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
10041004
</components>
10051005
</package>
10061006

1007-
<package name="OS_ItemList" type="Module" version="4.1.10">
1007+
<package name="OS_ItemList" type="Module" version="4.1.11">
10081008
<friendlyName>OS_ItemList</friendlyName>
10091009
<description>
10101010
Itemlist admin for shopping/favorites list

Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("4.1.10.0")]
36-
[assembly: AssemblyFileVersion("4.1.10.0")]
35+
[assembly: AssemblyVersion("4.1.11.0")]
36+
[assembly: AssemblyFileVersion("4.1.11.0")]

0 commit comments

Comments
 (0)