Options Calculation - Can it be done?

Hi,



I need to use two options and obtain a result from their selection and add it to the base price of an item. eg: BasePrice + Option1 + (Option2 * Constant) = NewPrice.



Is there a way to do this? While possible, I really don’t want to hack away at the .php.



Thanks,

Shane

Yes, it is possible and you don’t have to touch the .php. See the knowledgebase article on options here - [url]CS-Cart Documentation — CS-Cart 4.15.x documentation.

I have looked at that but can only add (+) values. I need to do a multiplication based upon the selected value (n*x). I don’t seem to be able to see the * option available. Can you please point me in the correct direction.



Thanks,

Shane

Will it work if you use the percentage as the modifier type rather than the $?

No, the correct proportional relationship cannot be based on one entity as BasePrice + Option1 is unknown.

Thanks,

Shane

you cant do it as far as i’ve seen and I’ve put in a feature request (about 4 days ago) to have it added. might be a while though. (some of my products are volume related)



you can add to the feature request [URL=“http://forum.cs-cart.com/vbugs.php?do=view&vbug_id=1661”]http://forum.cs-cart.com/vbugs.php?do=view&vbug_id=1661[/URL]

Yup, it’s possible. I paid the CS dev team to write the code but my site should do what you are wanting. Have a look at [url]url] for an example of how it works. I have a base price of $5. Then the first option is size; it sets the base price of the product. After that, all options are percentage based on the price set by the first option. Works perfectly.

I dont see why they dont add these mods onto the basic cscart. I can understand that you’ve paid for it to be developed but they should add it to cscart after perhaps 6 months.



Just started doing the same thing in the uk (vinyl lettering) and i had to use categories as i couldn’t multiply 2 numbers together.



I’m surprised you dont do lettering .

Was wondering if the mod was one you could change easily via admin or was it “one off code” written for this one setup and it’s set in stone.

Oh I do custom lettering too: [url]url]



The code is written so where there aren’t any options on the backend. It seems to work fine for what I need so I didn’t require anything with that mod to be visible to me. Now my pop-up options block has a lot of backend options for me to choose from.



But I too am surprised some of these custom code options aren’t eventually added to the cart down the road. I guess they feel it may upset the ones who originally paid for the customization.

[quote name=‘IsItFast’]But I too am surprised some of these custom code options aren’t eventually added to the cart down the road. I guess they feel it may upset the ones who originally paid for the customization.[/QUOTE]

Which is so silly. Features that become part of the cart are typically maintained from one version to the next (well, at least, most of the time); custom features frequently require more money to integrate into the next version,



Bob

Yeah, I myself wouldn’t be upset to see the mods I paid for included into newer versions. As long as custom mods from other customers get included too. I suppose some mods (such as the price calculations discussed in this thread) are kind of specialty and really are too rare to be included. But I think my pop-up info box next to options should be included in future versions of the cart. It doesn’t have to be used at all (if not needed) an is back-end friendly.

I liked the (?) pop up box as well

I would be really happy to see mods I had paid for included in the newer versions as well. This would also mean that, when upgrading, I wouldn’t have to pay for them again!

Yeah, I had to pay for all my stuff twice. I paid to get the same mods in 1.3.5 but before I got that cart live 2.0 came out. So I figured it would be better to get everything working in 2.0 before going live. Which meant that my mods had to be totally redone for 2.0 architecture.

"Yeah, I had to pay for all my stuff twice. I paid to get the same mods in 1.3.5 but before I got that cart live 2.0 came out. "



May be thats why they don’t include them.



So who owns the code? is it the buyer or the cs team?



If you own it I guess you could give the code away. If there were enough takers when it came to an update there would at least be other people in your boat that could help get it working on the new version. Perhaps you could sell the code to snorocket (for a pittance so he could sell it in his store) and he would automatically upgrade (maybe not between versions) but as long as the core remained the same or cut you in on some of the profit.



Just my thoughts to reduce your cost (as i guess they’re not cheap) and share in the community.



Better still ask cs team if they can include it in the next upgrade.

[quote name=‘mrfoameruk’]So who owns the code? is it the buyer or the cs team?[/QUOTE]



I would say it would have to be the buyer as the mods are wanted by the buyer and purchased and paid for by the buyer, so it would be up to the buyer as to whether they passed it on. Maybe another section in the forum for this might be good.



Alternatively, if anyone wanted to get CS-Cart to make any mods for them, they could always post to the forum to see if anyone else was interested and share the cost that way (and I am sure this has been done before).



I purchased a mod that enabled my product codes to show for my options even if I wasn’t tracking inventory. It took CS-Cart a couple of hours to do and I can’t remember how much I paid for it now but I really needed to have this facility on my site so I figured it was worth paying for it and I thought the cost was fairly reasonable. However, I would have thought it would be something most people would need and would have been included in the latest version. With most things that are sold, if there is a variant, it usually has a different product code and as, if you are tracking inventory, the product code does change for options, I can’t see why it shouldn’t change if you are not tracking inventory.



I will need to pay for this mod again when I upgrade, although I may try and study the file to see what changes were made and whether the relevant file is similar to version 1 before paying for the mod again.