Migration to AbleCommerce

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
BekE
Ensign (ENS)
Ensign (ENS)
Posts: 11
Joined: Tue Feb 24, 2009 12:36 pm

Migration to AbleCommerce

Post by BekE » Wed Feb 25, 2009 3:58 pm

Hi,

I'm lending a hand with a migration from an existing shopping cart over to AbleCommerce.

So far we've been able to import everything across without a problem between direct data manipulation and the DataPort tool.

We've run into one thing that we're wondering how to best go about addressing in the AbleCommerce system.

Currently a number of products have special tags [!TODAY+X] within the text that are replaced (dynamically when the page is presented to the customer) with the current date + X number of days.

(So for example the description might end up saying, this product is available via our Rush delivery option after 3/1/09, and the date changes dynamically based on what today's date is, as it would always be available X number of days beyond the current date.)

This special tag appears in the product's large description and also in the product option/choices via "Rush - Available after [!TODAY+X]" and "Standard - Available after [!TODAY+X]" choices.

There is also a custom text box at the product level where the customer enters the date they require the product to be delivered by, and in the case of a product that has those Rush and Standard options, it won't allow the choice to be made if the date doesn't fit the option. (So if the Rush option says to the customer "Rush - Available After 3/15/09", the Add to Cart functionality will check to ensure they have entered something later than 3/15/09 in the custom box.) [We've added the custom text box in per the product templates - but what's the easiest way to attach a validation routine to it?]

Does anything similar to this already exist in Able Commerce? And if so, where would we find info on it? And if not, does anyone have a suggestion as to the best/most efficient solution as far as what to target when customizing it?

Thanks!

BekE
Ensign (ENS)
Ensign (ENS)
Posts: 11
Joined: Tue Feb 24, 2009 12:36 pm

Re: Migration to AbleCommerce

Post by BekE » Tue Mar 03, 2009 1:18 pm

In case it's of help to anyone, I was able to resolve my problem by editing the ProductHelper.cs file and modifying the option name as the dropdown was created.

Similar to this post, only I needed to also make a helper function to replace the special tag with the necessary date in the option name/text.

viewtopic.php?f=44&t=7304&hilit=OptionChoice

Now the only thing left is to track down how to validate that the customer-entered value in the custom field is a valid entry per their option choice/date available.

Thanks

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Migration to AbleCommerce

Post by mazhar » Wed Mar 04, 2009 8:20 am

You can try adding ASP.NET validation controls through code at run time. For example when ProductHelpers Build Choices function is called, then you can try to add validation control for each required control by writing some code.

BekE
Ensign (ENS)
Ensign (ENS)
Posts: 11
Joined: Tue Feb 24, 2009 12:36 pm

Re: Migration to AbleCommerce

Post by BekE » Fri Mar 06, 2009 12:39 pm

Hi Mazhar,

Thanks for the help. Sorry, I've not been feeling well this week, just to make sure I'm following ... I need to add a bit of validation code to a custom field (created via the product templates).

It sounded like you might be referring to validating the option/choice ? but I need to validate that the customer-entered value in a custom field (created via the product templates) is a valid "required on" date according to the availability of the product.

(In the Delivery Type dropdown they will choose Rush (Available After x/y/zz/) or Standard (Available After x/y/zz) and then they also need to type in a 'required by' date in the custom field. We need to validate that the date typed into the 'required by' field is valid according to their dropdown choice. For example if they choose Standard, which is available after 3/25/09 but then they type into the 'required on' box a date of 3/12/09 it needs to come back and tell them they should choose Rush (or that it isn't available in that time-frame).)

Would that still be the BuildChoices section? Is there another piece handy in that same file where a validation control is added that I could look at? Should be fine if I can find something similar to pattern it after.

Thanks!

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Migration to AbleCommerce

Post by mazhar » Thu Mar 12, 2009 8:19 am


Post Reply