Calculation in Backend Field

6 posts by 3 authors in: Forums > CMS Builder
Last Post: January 25, 2010   (RSS)

By InHouse - January 22, 2010

Suspect I know the answer to this one... but:

Is there any recommended method to insert an auto-calculate field in the CMSB backend?

i.e.: members of the site can place product orders using the backend. Would like to auto-calculate totals for products and costs either live or upon submission.

Failing to do this will force us to move the entire process to a front-end section of the site which we'd like to avoid in this case.

Many thanks,
Jayme

Re: [InHouse] Calculation in Backend Field

By Dave - January 22, 2010

Hi Jayme,

You could write a plugin to do it.

The basic code would look something like this:

if (@$_REQUEST['menu'] == 'product_orders') {
$_REQUEST['myField'] = "my new value";
}


Or you could hook into the save function if you wanted to do something more elegant.

Hope that helps! Let me know if that will work for you.
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Calculation in Backend Field

By InHouse - January 22, 2010

I think I see what you mean Dave. Thanks for the steer. I'll see what I can cobble together.

Still hoping for a CMSB shopping cart / e-comm toolkit. ;-)

J.

Re: [InHouse] Calculation in Backend Field

By Dave - January 22, 2010

>Still hoping for a CMSB shopping cart / e-comm toolkit

Me too! Can't wait to replace the paypal we're using in the add-ons store.

We just released a couple new plugins with more membership functions. We have a geolocating one in development next, maybe sometime after that.

I'd like it to be able to tied to the current users account so it stores their cart items in their profile like amazon does. Many people probably want non-login carts though.
Dave Edis - Senior Developer
interactivetools.com

Re: [InHouse] Calculation in Backend Field

By gkornbluth - January 23, 2010 - edited: January 23, 2010

Hi Jaymie,

Hope you'll pass on what you put together with the rest of us.

Best,

Jerry Kornbluth
The first CMS Builder reference book is now available on-line!

Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php