====== FAQs ====== ==== I'd like a donation select box and the option to enter a custom value... where do I start? ==== We've had various requests for this so here's a quick and dirty example using the FoxyCart included JQuery. It's not a "paste this in your site and run with it" bit of code, but it should point you in the right direction. The field names are prefixed with "x:" so they won't be sent to FoxyCart as product options and the "\\" is needed to help unconfuse the JQuery selector. Basic concept involves stuffing a hidden input named price with the value you want to send to FoxyCart. To make this a working example, you'd need to fully setup the form as you need it. Please post any questions in the forum.
==== Can I hide the quantity field in the cart? ==== Add &max_quantity=1 to your cart add links or a hidden input named "max_quantity" with a value of 1 if you're using a form. Then add some css to color the text in the table header to match your header background and hide all the stuff you don't need anymore: Note, you may also just want to use the cart=checkout option to go directly to the checkout page if you're only selling a single product. ==== My checkout page is narrow. Can I make the "standard" checkout theme thinner? ==== Yes, you can start by overriding one declaration: You can stick that override in your own CSS file if you want, rather than inline. Just make sure it comes //after// the ''/themes/standard/styles.css'' call. ==== Can I remove the CVV field entirely? ==== Yes. Using the built-in jQuery, it'd look like this: Put that down by your closing '''' ==== Can I move the custom field div? ==== Yes, with just a bit of jQuery: Put that down by your closing ''''. If you want to move it to a different place in the code, just change the target of the ''insertAfter()'' function. ==== Can I make customer_phone a required field? ==== Sure. Just get a little creative with your checkout template. By adding this code (//after you call the checkout placeholders//), your customer_phone will now be required: **v0.3.0 and later:** **v0.2.9 and earlier:** ==== Can I hide the Purchase Order field (I want to invoice them later and don't need a PO#)? ==== Sure. Just add some love like this: ==== Can I make the "Save your credit card" checkbox checked by default? ==== Yes. Add this in the head section of your page. ==== It says my cached images are "corrupt". What gives? ==== Try clearing your image cache. Log into your admin panel, click Templates -> Image Cache -> Clear all cached images. If that doesn't fix the problem, let us know. ==== XML: How do I get epoch time from yyyy-mm-dd hh:mm:ss ? ==== Example to convert from ''yyyy-mm-dd hh:mm:ss'' to ''mm/dd/yyyy'': $format = '%m/%d/%Y'; // New desired format $time = '2007-05-04 20:53:57'; // The timestring (which you'd get from the XML, but it's hardcoded here just as an examle) $time = strtotime($time); // Convert the original to epoch time $time_new = strftime($format,$time); // Convert from epoch time to the new format Reference: http://us2.php.net/strftime ==== Redirect to a Custom "JavaScript Required" Page ==== If you'd like to alert your customers that javascript is required, here's one method. - Change all your "add-to-cart" links, forms, and image maps to point to your own custom "JavaScript Required" page. - After you include your ''foxycart_includes.js'' file, add the following: If you have image maps or other methods of adding products to your cart, like image maps or dynamically generated links or forms, you'll have to modify that code as necessary to make sure you get everything. - Test to make sure it's working as expected. If JavaScript is enabled things should be fine. If js is disabled, the user should be sent to your custom page on an add-to-cart attempt. - You might want to make your "JavaScript Required" page link to some instructions (like [[http://www.google.com/support/bin/answer.py?answer=23852|Google's]]), and provide a BIG PROMINENT PHONE NUMBER for the customer to call in their order if they want to.