FoxyCart's templates are beautiful and responsive out of the box with the new default templates available in 2.0. Paired with the new template configuration, you can even customise the templates without having to touch a single line of code.
Under the hood though, we make use of some standards and systems that make the templates extremely flexible and customizable, so that if you need, you can alter the raw markup of the page to suite your needs.
Working with FoxyCart Templates
You can set your store logo in the Settings tab of your FoxyCart Store's Admin. There, you can add the url for your store's logo to the “logo url” field. We'll also securely cache your logo from that URL to ensure it and your templates are served securely.
If you don't already have a copy of your logo someplace online, an alternate option is to add the logo to a Dropbox folder, then follow these steps:
https://www
to https://dl
and load it in your browser
As an example, your share URL might be https://www.dropbox.com/s/ggq5g1qpvonh0/My%20Logo.jpg?dl=0
, and after updating it would be something like https://dl.dropboxusercontent.com/s/ggq5g1qpvonh0/My%20Logo.jpg?dl=0
. That's an easy and free way to get your logo hosted someplace that we can access it from.
FoxyCart supports many common template customizations from the Template Configuration page in the admin. You can configure:
Customize Cart Display
checkbox. Hide weight, code, category, subscription details, custom options, or all options. This will hide the items in the list for which you've removed the checkbox from the cart, checkout, web receipt, and email receipt.Much of the language of the Foxy cart, checkout, and receipt can be modified in the TEMPLATES language customization of the Foxy admin. Expand each area or show all details to see the strings available for you to customize.
Using the custom code template setting, it's now possible to add CSS and javascript to your templates without needing to modify the templates themselves. If you just want to change the background, some colors or styling, or anything else you accomplish with CSS only, we strongly recommend taking this approach.
You can customize your styling in the “configuration” section of your store's Foxy admin by checking the Add custom header and footer code to your templates
and inserting your styles in the custom header:
text box like this:
<style> #fc .fc-form-control { background: #cc33cc; } </style>
This changes the background of entry boxes to magenta.
To see what classes you need to use, we recommend making use of an inspection tool - which most modern browsers will have built in. By using their inspection tools, you can select a given element on the page and the tool will show you the markup that outputs that element and you'll then be able to see the classes that apply to it.
For information on the different browser development tools - see the following:
Within the cart and checkout there are a few instances of SVG icons that are used for things like arrows and padlocks. Styling these elements are a little different than above, as you need to target the source element of the icon and alter it using fill
. The following are the different icons that we currently include and their default fill colors (some may have different colors applied in specific locations that differ to the following):
/* Used within continue shopping button on full-page cart/checkout */ #fc .fa-angle-double-left, #fc .fc-cancel-continue-shopping svg { fill: #666; } /* Used within continue shopping button on sidecart */ #fc .fa-caret-left, #fc .fc-sidecart-only-fixed .fc-fixed-button-left svg { fill: #FFF; } /* Used within top proceed to checkout button on sidecart */ #fc .fa-caret-right, [data-fc-sidecart] #fc .fa-caret-right, #fc .fc-sidecart-only-fixed .fc-fixed-button-right svg { fill: #888; } /* Used within bottom proceed to checkout button on sidecart and credit card field on tablet/mobile checkout */ #fc .fa-lock, #fc-cart .fc-action--checkout--button svg, #fc .fc-checkout__section--payment svg.fc-svg-icon--lock { fill: #C1DB9B; } /* Used within payments section on full-size checkout */ #fc .fa-lock-large, #fc .fc-checkout__section--payment svg#fc-icon-lock-large { fill: #EEE; } /* Used within remove coupon option */ #fc .fa-times-circle, #fc .fc-transaction__discounts .fc-action--close svg { fill: #666; } /* Used within shipping fields on sidecart */ #fc .fa-truck, #fc .fc-address-entry svg { fill: #999; } /* Used within tax fields on sidecart */ #fc .fa-bank, #fc .fc-address-entry svg { fill: #999; } /* Used within address validation modal */ #fc .fa-map-marker { fill: #999; }
Use any of the applicable CSS rules above, altering the fill color code to customise as needed.
If you are adding custom styles, you may have a need to apply different styles based on the viewport the user is using. The following are the common media queries we utilise in our default styles to match into similar break points as us. You would just need to use the specific queries here based on your specific style requirements:
@media (max-width: 480px) { } @media (min-width: 768px) { } @media (min-width: 768px) and (max-width: 991px) { } @media (min-width: 992px) { } @media (min-width: 992px) and (max-width: 1199px) { } @media (min-width: 1200px) { }