| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Adding calculated fields to the Product Admin Area | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Adding calculated fields to the Product Admin Area
I'd like to add the following fields to the product admin area. And I want them to calculate base on the Sale price, they should not be editable. How do I do that?
http://i21.photobucket.com/albums/b298/fasterthanyours/Admin%20-%20Deposit%20Info.jpg
__________________
X-Cart 4.3 Joomla Among other things |
|||||||
#2
|
|||||||||
|
|||||||||
Re: Adding calculated fields to the Product Admin Area
Possible, not so hard to do. I have done similar for XC5 module.
You can contact me with details.
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
|
#3
|
|||||||
|
|||||||
Re: Adding calculated fields to the Product Admin Area
Those are the details. How do I make a field that shows 25% of the Price field and another that shows 75% of the Price field?
__________________
X-Cart 4.3 Joomla Among other things |
|||||||
#4
|
|||||||||
|
|||||||||
Re: Adding calculated fields to the Product Admin Area
Actually, I do not see a problem here. Just create new properties in Product model and define their values as you need.
__________________
Found a bug in X-Cart? Post it to our bug tracker! Know how to make X-Cart better? Suggest an idea! |
|||||||||
#5
|
|||||||
|
|||||||
Re: Adding calculated fields to the Product Admin Area
Remember I'm green as heck on this stuff. How do I do that?
__________________
X-Cart 4.3 Joomla Among other things |
|||||||
#6
|
|||||||||
|
|||||||||
Re: Adding calculated fields to the Product Admin Area
Hello,
\XLite\View\Model\Product::$schemaDefault is the array that defines fields for the Edit Product form. You should decorate this class from your module and add your custom fields from the constructor method. \XLite\View\Model\Product::getDefaultFieldValue() is the method that returns the default value for a form field. So, you should decorate this method and make it return the product price multiplied by your values for the custom fields. However, if your goal is not learning how to code for X-Cart 5, it makes sense to hire someone who could customize it for you
__________________
Alex Solovev, Qualiteam --- User manual Video tutorials X-Cart FAQ You are welcome to press "Thanks" button if you find this post useful Click here to learn how to apply patches X-Cart Extensions |
|||||||||
#7
|
|||||||||
|
|||||||||
Re: Adding calculated fields to the Product Admin Area
The article might be helpful as well:
http://kb.x-cart.com/display/XDD/Adding+new+property+to+a+product
__________________
Found a bug in X-Cart? Post it to our bug tracker! Know how to make X-Cart better? Suggest an idea! |
|||||||||
|
|||
X-Cart forums © 2001-2020
|