| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Product Modifier Math (help) | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() Hello Great Forum
I have the price modifier working perfectly if the user buys 1 product. I am selling pens that when a logo is added there is a $25 fee added to the price. For this store I would like the modifier to only add $25 to the total price. This will be true for each time I use a price modifier in the store The way it is 1. Price modifier set to $25 Logo Setup Fee 2. Minimum order of Pens 250 @ $0.42 3. Price is calculated now [I think] with (250 x 0.42) + (250 x 25) = $6,355.00 4. What I want is (250 x 0.42) + 25 = $130 Like I said in this store I can have so each time I use a price modifier it will works this way no matter what price modifier on any prodcut. What do you think. Is this possible? It should be but I have no idea where the math is done. Or maybe things can stay the way they are and be modified in the javascript box which of course I am also ignorant of.
__________________
X-Cart version 4.6.4 GOLD X-Cart version 4.6.1 GOLD X-Cart version 4.5.5 GOLD X-Cart version 4.5.4 GOLD X-cart Version 4.5.3 GOLD X-cart Version 4.4.3 GOLD X-cart Version 4.4.2 GOLD PHP 5.3.27 MySQL client 5.5.37 Linux |
|||||||
#2
|
|||||||||
|
|||||||||
![]() Actually this is a bit difficult isn't it? I keep tossing this back and forth in my head, and I can't see an "easy" way to do this.
Of course it can easily be custom coded, but it would require PHP skills. Here is an option, have the logo customization tied to a separate product, and explain that they need to add that product to the cart as well, link in the description.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey XcartGuru X-cart Tutorials | X-cart 5 Tutorials Check out the responsive template for X-cart. |
|||||||||
#3
|
|||||||
|
|||||||
![]() Hello totaltec
I agree it has to be coded and as you say it is probably in a php file. My question is where does x-cart make that calculation? More than likely xcart would not make this easy to modify and make it easy to find where the calculation actually is. Thanks again for your suggestions and your help with this.
__________________
X-Cart version 4.6.4 GOLD X-Cart version 4.6.1 GOLD X-Cart version 4.5.5 GOLD X-Cart version 4.5.4 GOLD X-cart Version 4.5.3 GOLD X-cart Version 4.4.3 GOLD X-cart Version 4.4.2 GOLD PHP 5.3.27 MySQL client 5.5.37 Linux |
|||||||
#4
|
|||||||||
|
|||||||||
![]() Well my suggestion then is to not use product options for this, instead I think it may be simpler to add your own charge, and pass that through the cart. It's not going to be easy, have to take it step by step.
The first step is to create the trigger, the checkbox on the product page in the admin that tells us that this product is intended to receive this extra charge. It could be a checkbox, or and input, and you could decide to use extra fields (though I would just code my own). Here is a video tutorial for adding the custom variable: http://www.youtube.com/watch?v=-7ESOW0pKU4 Here is how to use extra fields : http://www.youtube.com/watch?v=dRGRWkotqvM After you have a checkbox or an input field on the product page, and are passing those variables through to the customer side, then we can create a special checkbox for Custom on the product page. Once you get there let me know, and I will guide you through the next steps, adding the product to the cart with the extra price assigned, then tacking on the charge. Actually the more I think about it, the code to do this is going to be quite tricky. The basic problem is going to be that XC multiplies the price by the quantity in the cart process. We will have to either show the price as a separate line item under the product, or count the quantity of items and divide the charge between them. Either way we need the special variable no matter what. That has me thinking about another way to handle this. Perhaps we can quantify the price increase, and control it based on quantity. Scenario: 150 minimum pen order. Custom option is selected modifies the price to be + $0.17 (150 * $0.17 = $25.50) Then we set a wholesale discount for 200 pens of $0.05, effectively lowering the price per pen to $0.12 Lots of silly math this way. And the wholesale discounts would still apply, even without the customization option. Oh well, guess its got to be the hard way. ![]()
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey XcartGuru X-cart Tutorials | X-cart 5 Tutorials Check out the responsive template for X-cart. |
|||||||||
#5
|
|||||||
|
|||||||
![]() Hello Again
This is amazing to me how difficult this is. 1. If the math for the product modifier is (250 x 0.34) + (25 x 250) and you know where this is calculated. 2. My question is where can you change the formula for the complete site when a price modifier is used to have the following calculation (250 x 0.34) + 25 or what ever the price modifier is for that product. Doing #2 would work perfectly through the whole store on any modifier Maybe I am to simple minded. Maybe someone can say why it will not work if the calculation is changed. I cannot believe this is the first time a setup fee is charged.
__________________
X-Cart version 4.6.4 GOLD X-Cart version 4.6.1 GOLD X-Cart version 4.5.5 GOLD X-Cart version 4.5.4 GOLD X-cart Version 4.5.3 GOLD X-cart Version 4.4.3 GOLD X-cart Version 4.4.2 GOLD PHP 5.3.27 MySQL client 5.5.37 Linux |
|||||||
#6
|
|||||||||
|
|||||||||
![]() Well it is not that difficult, it just requires custom code.
The math is not (250 x 0.34) + (25 x 250) if it was that would be simple. The math is 250 x (25.00 + 0.34)
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey XcartGuru X-cart Tutorials | X-cart 5 Tutorials Check out the responsive template for X-cart. |
|||||||||
#7
|
|||||||
|
|||||||
![]() Hello Again
AOK, I have a person that has done a great great great job doing some customization for us. He should be working on it now. Just one more ignorant question. Am I on the right idea of just changing the formula? probably not!
__________________
X-Cart version 4.6.4 GOLD X-Cart version 4.6.1 GOLD X-Cart version 4.5.5 GOLD X-Cart version 4.5.4 GOLD X-cart Version 4.5.3 GOLD X-cart Version 4.4.3 GOLD X-cart Version 4.4.2 GOLD PHP 5.3.27 MySQL client 5.5.37 Linux |
|||||||
#8
|
|||||||||
|
|||||||||
![]() I personally would not change the formula. I would pass along a custom price increase based on a checkbox in the admin. But I believe in customizing XC to add to the functionality not take it away.
Really, however you accomplish it, if it meets your needs and performs as expected, it is going to be fine. ![]()
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey XcartGuru X-cart Tutorials | X-cart 5 Tutorials Check out the responsive template for X-cart. |
|||||||||
|
|
|||
X-Cart forums © 2001-2020
|