tazwales Posted December 14, 2009 Share Posted December 14, 2009 Hi, I've been a web designer and programmer for years but I've never been tasked with developing a eCommerce shop before - and I didn't seem to start with an easy one. I am creating a shop to sell foam cut-to-size (for chairs, cushions and sofas) and to sell other sundry items (sundry items done - simple with oscommerce) but here's my problem: I have tried to add a product called foam cut-to-size and had attributes for the thickness, length and width selectable from drop down menus - but they don't add up properly since I'm multiplying the Length by Width by Thickness and then multiplying that by the price per cm² (or ³ whatever it is) so I don't get the proper price because the attributes have their own per-attribute price which gets added onto the price. So, I thought I'd write a simple javascript calculator with the formula LxWxTx(type of foam)x(cost per cm²) and thought adding a submit button to that form would make it transfer into the oscommerce cart... It doesn't. The question I have is how do I make my simple calculator's end result with the customers input of the dimensions add to the cart and checkout through oscommerce and paypal? I hope someone here can help because I've spent so many hours on this it's starting to become irritating. If anyone wishes to see what I've managed so far (second attempt at the shop, so it's got the default products installed) go to www.foamltd.co.uk Thank you. And I'm sure if it's a lot of work I will be happy (not happy, but willing :P) to pay for the right solution. Taz Quote Link to comment Share on other sites More sharing options...
♥FWR Media Posted December 14, 2009 Share Posted December 14, 2009 I wouldn't submit a form I'd send an ajax query with the necessary variables via _GET (including the osCsid to retain session state) to a new php page (application_top.php would need to be called at the top and application_bottom at the bottom) which adds the necessary costs etc to the cart object. On success of the ajax query header redirect the customer to the cart. Quote Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.