Guest Posted October 15, 2008 Posted October 15, 2008 Hi guys, I am really new to this, recently (2 weeks ago) installed the oscommerce solution and everythings been going well, until now!! i am going to sell different types of cable on a price per metre, only problem i have there is no option to allow the customer to enter a quantity required? Anyone got any ideas? Thanks in advance!!!
Jack_mcs Posted October 15, 2008 Posted October 15, 2008 You can use products attributes for that, which are built into your shop, or there are contributions that will add a quantity box to the shopping cart page (and other pages too). Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
Guest Posted October 15, 2008 Posted October 15, 2008 Hi, the attributes bit doesnt really do what i want! the quantity box sounds great!! - can you provide me with a link to the contribution? Thanks again! Dan
lindsayanng Posted October 15, 2008 Posted October 15, 2008 just go to addons.oscommerce.com and type Attribute QTY you will find it there.. among many other neat things. A great place for newbies to start Road Map to oscommerce File Structure DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways! HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you Proud Memeber of the CODE BREAKERS CLUB!!
Jack_mcs Posted October 16, 2008 Posted October 16, 2008 Hi, the attributes bit doesnt really do what i want! the quantity box sounds great!! - can you provide me with a link to the contribution? Thanks again! Dan You'll have to search for them. I'm pretty sure they are named product multi, quantity pull down menu and product quantity box. There are probably others. The search function in downloads isn't the best though so you will just have to try variations unless someone knows the correct, full name. Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
Guest Posted October 16, 2008 Posted October 16, 2008 Thanks for that!! The only problem I have is that there are ten's of different solutions and i dont want to mess my shop up!!! Can anyone point me to the exact contribution I need? I want to show the price per meter eg. £1.00 per m, then allow the customer to input _ _ _ m so that it calculates in the checkout section? Help!! its the only thing holding me up! Dan
Guest Posted October 16, 2008 Posted October 16, 2008 Right! Iv added the quantity box - great!! However, no matter what quantity I enter, when it redirects to the basket, it shows 99! Please have a look; http://www.cableforce.co.uk/catalog/ Where can i fix this? Thanks, Dan
failsafe Posted October 16, 2008 Posted October 16, 2008 Right! Iv added the quantity box - great!! However, no matter what quantity I enter, when it redirects to the basket, it shows 99! Please have a look; Not quite true... if you have 0 in the basket already and you select 97, it shows 46. Something very strange is going on. You'd better have a careful look at where it does the work to add X items to the basket. I think there's a setting in the database that says the maximum items per basket. The default is 99. Perhaps you should take a look at that? It's called MAX_QTY_IN_CART in the configuration table. You might be able to set it in the admin back office, otherwise do it via phpMyAdmin or suchlike.
Guest Posted October 16, 2008 Posted October 16, 2008 Thanks for the fast response! I havent a clue whats up with it, im new to all this as well, so your instructions dont mean a thing to me!! I just removed the maximum number of items to 0 - i dont want a maximum!! But now its showing some silly numbers - any ideas? Thanks
Guest Posted October 16, 2008 Posted October 16, 2008 The contribution I added was this by the way!!; http://www.oscommerce.info/kb/246 Ta!
failsafe Posted October 16, 2008 Posted October 16, 2008 I just removed the maximum number of items to 0 - i dont want a maximum!! But now its showing some silly numbers - any ideas? Yes - setting it to 0 won't work I'm afraid. There's a check in includes/classes/shopping_cart.php inside the add_cart() function. If the quantity is > MAX_QTY_IN_CART then it sets it to 0. Therefore, set MAX_QTY_IN_CART to a big number in your database, like 9999999 or similar. In the stock version of osC the add_cart() function is called from includes/application_top.php. I suspect there's a bug in your code in that file. Have a look carefully at the installation instructions for the QTY contribution you added to see that you've made all the changes correctly, especially those in application_top.php (I'm making a bit of an assumption here because I haven't used that contribution) :)
failsafe Posted October 16, 2008 Posted October 16, 2008 I'm a bit confused actually, I thought you were selling cable by the metre. On your website the only cable I can see is the 305m reels. The quantity just selects how many reels I want as it's implemented at the moment. So if I select 10 as the quantity, presumably I'd end up with 3km or the stuff. The price is multiplied by the qty figure too. Am I missing something here?
Guest Posted October 16, 2008 Posted October 16, 2008 Hi, I didnt change anything in the contribution application_top.php file! just uploaded as is.... The cable I am going to sell by the metre isnt on the site yet, I didnt want to add 40 types of cable if I then had to go back to add the quantity box! Any more ideas?
failsafe Posted October 16, 2008 Posted October 16, 2008 Hi, I didnt change anything in the contribution application_top.php file! just uploaded as is.... The cable I am going to sell by the metre isnt on the site yet, I didnt want to add 40 types of cable if I then had to go back to add the quantity box! Any more ideas? OK, so perhaps we can assume that the settings in application_top.php are OK then. Have you corrected the value of MAX_QTY_IN_CART in your database, to a big number? Well, you could just have a look at the logic of application_top.php where it deals with adding things to the cart... i.e. where it calls the add_cart() function, just to be on the safe side. At a quick glance it looks like you should need to alter this file because it does things like add 1 to the cart quantity according to the settings of POST or GET variables. Since you're now wanting to add more than 1 according to the settings in the quantity box, this seems suspicious to say the least. If you are certain you have correctly followed all the instructions to install the contribution you mention then I suppose the next step for you would be to work through slowly using debug statements at strategic points, to see what's going on in your code concerning quantity and gradually close in on the bug!
Guest Posted October 17, 2008 Posted October 17, 2008 Yes iv changed the cart settings to 9999. Im stuck now because I dont know anything about php, honestly if a 'bug' bit me on the backside I wouldnt know what it was! What about replacing the applicaton_top.php and product_info.php with the original and finding a new contribution? - anyone any ideas where I can get another quantity text box? Thank you.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.