CommerceBuilder Project on ASP.NET 4.0

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
lhmist
Ensign (ENS)
Ensign (ENS)
Posts: 1
Joined: Wed Apr 18, 2012 6:45 pm

CommerceBuilder Project on ASP.NET 4.0

Post by lhmist » Wed Apr 18, 2012 7:06 pm

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

User avatar
dgoranov
Lieutenant (LT)
Lieutenant (LT)
Posts: 55
Joined: Sun Jan 16, 2011 3:58 pm
Location: Boston, MA
Contact:

Re: CommerceBuilder Project on ASP.NET 4.0

Post by dgoranov » Wed Apr 18, 2012 11:26 pm

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 ...
Dimi Goranov
Drundo Software Inc.
AbleCommerce Hosting and Management
Email: dgoranov@drundo.com
Ph: 888.464.2140

mtrujillo86
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 34
Joined: Wed Feb 29, 2012 4:45 pm

Re: CommerceBuilder Project on ASP.NET 4.0

Post by mtrujillo86 » Thu Apr 19, 2012 11:29 am

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);

mtrujillo86
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 34
Joined: Wed Feb 29, 2012 4:45 pm

Re: CommerceBuilder Project on ASP.NET 4.0

Post by mtrujillo86 » Thu Apr 19, 2012 12:07 pm

I need to access this custom object through a scriptlet.

mtrujillo86
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 34
Joined: Wed Feb 29, 2012 4:45 pm

Re: CommerceBuilder Project on ASP.NET 4.0

Post by mtrujillo86 » Thu Apr 19, 2012 12:38 pm

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?

mtrujillo86
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 34
Joined: Wed Feb 29, 2012 4:45 pm

Re: CommerceBuilder Project on ASP.NET 4.0

Post by mtrujillo86 » Fri Apr 27, 2012 12:58 pm

Still haven't been able to figure this one out.

User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Re: CommerceBuilder Project on ASP.NET 4.0

Post by AbleMods » Mon Apr 30, 2012 10:20 am

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
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

mtrujillo86
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 34
Joined: Wed Feb 29, 2012 4:45 pm

Re: CommerceBuilder Project on ASP.NET 4.0

Post by mtrujillo86 » Mon Apr 30, 2012 11:16 am

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.

User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Re: CommerceBuilder Project on ASP.NET 4.0

Post by AbleMods » Mon Apr 30, 2012 1:00 pm

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

User avatar
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

Post by jmestep » Tue May 01, 2012 7:25 am

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

mtrujillo86
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 34
Joined: Wed Feb 29, 2012 4:45 pm

Re: CommerceBuilder Project on ASP.NET 4.0

Post by mtrujillo86 » Mon May 07, 2012 5:37 pm

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.

Post Reply