CommerceBuilder Project on ASP.NET 4.0
CommerceBuilder Project on ASP.NET 4.0
Hello,
We have the source code to the API and it's on asp.net 2.0. Would ablecommerce object to us upgrading it to asp.net 4.0? Would we have a hard time upgrading?
Thoughts?
Thanks
We have the source code to the API and it's on asp.net 2.0. Would ablecommerce object to us upgrading it to asp.net 4.0? Would we have a hard time upgrading?
Thoughts?
Thanks
Re: CommerceBuilder Project on ASP.NET 4.0
If you are not planning to add any asp.net 4.0 specific functionality not available asp.net 2.0, a good development practice is to
keep the existing API code unchanged and use partial classes for extending existing Commercebuilder classes.
Keeping all custom code separate from the existing CommerceBuilder code will allow you to apply future AbleCommerce patches and
upgrades without additional CommerceBuilder code merges and updates. The same applies to the database schema - keep all new custom
database tables as much as independent from the existing DB schema as possible.
Hope this helps ...
keep the existing API code unchanged and use partial classes for extending existing Commercebuilder classes.
Keeping all custom code separate from the existing CommerceBuilder code will allow you to apply future AbleCommerce patches and
upgrades without additional CommerceBuilder code merges and updates. The same applies to the database schema - keep all new custom
database tables as much as independent from the existing DB schema as possible.
Hope this helps ...
Dimi Goranov
Drundo Software Inc.
AbleCommerce Hosting and Management
Email: dgoranov@drundo.com
Ph: 888.464.2140
Drundo Software Inc.
AbleCommerce Hosting and Management
Email: dgoranov@drundo.com
Ph: 888.464.2140
-
- Lieutenant, Jr. Grade (LT JG)
- Posts: 34
- Joined: Wed Feb 29, 2012 4:45 pm
Re: CommerceBuilder Project on ASP.NET 4.0
I have a custom class derived from a WCF service. I'd like to add this class as an object to nvelocity, but because commercebuilder is on asp.net 2.0, i'm having difficulties.
I can't include a reference to my other project because it's on asp.net 4.0 and commercebuilder is on asp.net 2.0.
Any idea on how to get a WCF derived class into nvelocity below?
scriptletpart.cs:
System.Collections.Hashtable parameters = new System.Collections.Hashtable();
object store = Token.Instance.Store;
object customer = Token.Instance.User;
parameters.Add("store", store);
parameters.Add("customer", customer);
parameters.Add("page", this.Page);
//TODO: OBSOLETE PARAMETERS, REMOVE FOR AC7.1
parameters.Add("Store", store);
parameters.Add("User", customer);
DateTime Now = new DateTime();
parameters.Add("DateTime", Now);
I can't include a reference to my other project because it's on asp.net 4.0 and commercebuilder is on asp.net 2.0.
Any idea on how to get a WCF derived class into nvelocity below?
scriptletpart.cs:
System.Collections.Hashtable parameters = new System.Collections.Hashtable();
object store = Token.Instance.Store;
object customer = Token.Instance.User;
parameters.Add("store", store);
parameters.Add("customer", customer);
parameters.Add("page", this.Page);
//TODO: OBSOLETE PARAMETERS, REMOVE FOR AC7.1
parameters.Add("Store", store);
parameters.Add("User", customer);
DateTime Now = new DateTime();
parameters.Add("DateTime", Now);
-
- Lieutenant, Jr. Grade (LT JG)
- Posts: 34
- Joined: Wed Feb 29, 2012 4:45 pm
Re: CommerceBuilder Project on ASP.NET 4.0
I need to access this custom object through a scriptlet.
-
- Lieutenant, Jr. Grade (LT JG)
- Posts: 34
- Joined: Wed Feb 29, 2012 4:45 pm
Re: CommerceBuilder Project on ASP.NET 4.0
Another question would be, how can I add an object to nvelocity on the web layer before a scriptlet is rendered instead of adding the object in commercebuilder. How would this be done? Is it possible?
-
- Lieutenant, Jr. Grade (LT JG)
- Posts: 34
- Joined: Wed Feb 29, 2012 4:45 pm
Re: CommerceBuilder Project on ASP.NET 4.0
Still haven't been able to figure this one out.
Re: CommerceBuilder Project on ASP.NET 4.0
I think you need to add it as a parameter in the CommerceBuilder.Web.UI project. Open the Styles/WebControls/WebParts/ folder and modify ScriptletPart.cs
The actual changes would go in the override void CreateChildControls() method
The actual changes would go in the override void CreateChildControls() method
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com
-
- Lieutenant, Jr. Grade (LT JG)
- Posts: 34
- Joined: Wed Feb 29, 2012 4:45 pm
Re: CommerceBuilder Project on ASP.NET 4.0
I found that section which is the code I posted above.
The problem is that the object I need is in a asp.net 4.0 project. The commercerbuilder is a asp.net 2.0 project. Visual Studio will not let you add a asp.net 4.0 project reference.
So, my two options are:
Change CommerceBuilder source code projects to ASP.NET 4.0
Or
Figure out a way to add the object via the web project because my web project can reference my 4.0 project.
The problem is that the object I need is in a asp.net 4.0 project. The commercerbuilder is a asp.net 2.0 project. Visual Studio will not let you add a asp.net 4.0 project reference.
So, my two options are:
Change CommerceBuilder source code projects to ASP.NET 4.0
Or
Figure out a way to add the object via the web project because my web project can reference my 4.0 project.
Re: CommerceBuilder Project on ASP.NET 4.0
Dunno - i thought any custom class could be referenced in there and subsequently added as a parameter as long as it was visible application-wide.
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com
- jmestep
- AbleCommerce Angel
- Posts: 8164
- Joined: Sun Feb 29, 2004 8:04 pm
- Location: Dayton, OH
- Contact:
Re: CommerceBuilder Project on ASP.NET 4.0
Did you check out the nVelocity help on the web? It's sketchy and kind of abstruse but there is some. I think you're going down the wrong road trying to use nVelocity for this. It is slower than C# and Able doesn't recommend using it instead unless for email templates. They used it for scriplets to try to give merchants an easy way to swap out components on a page.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
-
- Lieutenant, Jr. Grade (LT JG)
- Posts: 34
- Joined: Wed Feb 29, 2012 4:45 pm
Re: CommerceBuilder Project on ASP.NET 4.0
I looked at NVelocity, but I the problem isn't in NVelocity. I can add whatever variable i'd like to NVelocity, the problem is getting the object to the NVelocitys Engine in AbleCommerce before AbleCommerce Constructs the page.
AbleCommerce adds their NVelocity Variables in CommerceBuilder.UI.Web in Scriptletpart.cs. I can't get my objects to this project to add in scriptletpart.cs because commercebuilder is in asp.net 2.0. The next step is to add the object in the web project before before or after the page executes scriptletpart.cs, but i'm having a hard time tracking this down.
It's for display purposes only. We are a movie theatre change and we want to create content pages with movie information on the fly such as:
$Movie.Rating
$Movie.Title
$TheatreLocation.GuestPhone
$TheatreLocation.Address
$TheatreLocation.BusinessHours
etc..... This would give us great flexibility when creating custom content pages or scriptlets.
AbleCommerce adds their NVelocity Variables in CommerceBuilder.UI.Web in Scriptletpart.cs. I can't get my objects to this project to add in scriptletpart.cs because commercebuilder is in asp.net 2.0. The next step is to add the object in the web project before before or after the page executes scriptletpart.cs, but i'm having a hard time tracking this down.
It's for display purposes only. We are a movie theatre change and we want to create content pages with movie information on the fly such as:
$Movie.Rating
$Movie.Title
$TheatreLocation.GuestPhone
$TheatreLocation.Address
$TheatreLocation.BusinessHours
etc..... This would give us great flexibility when creating custom content pages or scriptlets.