Tutorials
-
Twitter
- Have you seen this today? http://t.co/swByoPeC @pixilliondigi 01:25:54 PM January 19, 2012 from web
Facebook
FRIENDS
Category Archives: Development
New Launch : Films & Music LLP
Things have been quiet on the blog front recently, but that’s in partly due to how busy it’s been on the work side of things here at Toasted Digital. There’s been no shortage of great projects with agencies and freelancers a like.
The latest TD driven project is for a new company called Films & Music, who are doing creative business development for various levels within the music industry. With some help from Pixsaul on the MODx backend, we’ve illustrated, designed and built them a new web presence.
Facebook Apps Require SSL From 1st of Oct
If you’re into Facebook app development, it’s worth noting that Facebook appear to be going ahead with making it mandatory to serve your Canvas and Page Tab content from a secure connection from the 1st of October 2011. The Facebook blog very briefly mentions that you’ll need to obtain an SSL certificate to use these features. This’ll mean app owners will need to purchase a certificate to serve their content via https.

MODx Evolution to Revolution Tag Converter
I’ve been doing a few MODx Evolution to Revolution conversions recently, and developed a simple jQuery script to handle converting the Evolution template tags to the new Revolution syntax. It’s pretty basic, but it does the job, so I thought I’d share with the community. Hopefully in the future there will be an easy way to upgrade, but in the meantime little tools like this should help a little
Check it out
Confusion of the EU Cookie Law
I’ve recently written an article on HTML5′s Local Storage. The technology gives users a new level of ease through being capable of such things as remembering half completed forms for completion whenever they like. However, from the 26th of May 2011, this action is now illegal in the UK without the user’s prior consent.
The law, which comes from the EU’s Privacy and Electronic Communications Directive will apply to all websites within the EU. It affects all websites which store ‘non-essential’ cookies. So while we have the technology to remove extra hassle for users, as developers we’re now required to implement an extra consent handler (such as a popup) in order to use it.
The ICO website now has a slide which asks the user to accept cookies. Does the average internet user even know what a cookie is?
What does this mean? From what most people seem to understand, (and I use the word understand fairly loosely, as no one seems to completely understand this law, even the ICO are vague), this will basically make for instance, any website that uses google analytics, illegal. It’d also make remembering users’ preferences illegal without consent, which potentially means if a user chose not to grant permission, we can’t even remember that choice, creating a rather laborious cycle.
The law covers anything which stores information on a user’s computer, so HTML5 Local Storage would be inclusive of this despite being a similar technology, rather than a cookie.
From the ICO guidelines, it seems at least this would not affect ‘strictly necessary’ cookie data, for instance an “add to basket” action on an online shop.
We’ve been given a 1 year grace period to implement changes to our websites, but the general consensus is of being fairly uncertain exactly how to do this. From the point of view of a developer, the EU have been incredibly narrow-minded with their view of how cookies are used, and are at least in my opinion, massively hindering the progression of what we’re trying to achieve with making the online user experience as simple and easy to use as possible.
For a good break down and explanation of the law head over to Silktide or have a look at their very good video below.
Follow The Flag
Very happy to have launched a new Toasted Digital designed and built website last night. Follow The Flag is a directory for independent businesses run by forces families. It’s exclusively for people connected to the armed forces, and gives them a great online outlet to get their businesses seen in and around the community.
The website has been endorsed by both the chief executive of the Soldiers’ Charity, and the Controller of the RAF Benevolent Fund, as well as supporting the Royal Navy & Royal Marines Charity. All subscription profits are donated to these charities.
The website was fully designed and built by Toasted Digital, using a highly customised WordPress backend and FoxyCart for the subscriptions.
Check it out, and some of the nice businesses they’ve already got signed up, and give their Facebook page a like to be in with a chance of winning some Boden vouchers.
VingeBarna :: Norwegian Kids Clothing
A little while ago I completed a small store for the new Norwegian kids clothing range VingeBarna. The site is a clean build using some nice CSS3 features like @font-face, built on a simple MODx backend with FoxyCart and uses some custom shipping values. This is my first site in Norwegian, a language which I’m becoming a bit more familiar with, and hopefully not the last! I think I’ll stay well clear of the “Never translate Norwegian Bokmål” button for a little while yet though…
Crucial BMX Shop
After starting many moons ago, a site I’ve developed with Adi Gilbert and Richard Homer of 99Seconds has just gone live. Crucial BMX is the biggest BMX shop in the South West, and they needed a good online shop to sell their well-over-1000 different products. It’s clean and simple with awesome artwork by Adi, and has some personality packed in with javascript touches here and there.
Check it out! It’s powered by MODx Evolution and Foxycart and accepts major credit/debit cards securely.
Emma Johansson : Professional Cyclist
I’ve been quiet with the blogging recently, more than anything because it’s been a busy period. A few nice projects are nearing their end, or are nearing their launch, so the updates will be on the up.
Launched today is a blog redesign for Swedish cyclist Emma Johansson, which you can take a look at here. Emma is a world class cyclist and an active blogger, so check it out! The site makes use of @font-face, which I’m now swaying happily towards… I may cover a tutorial soon, although there’s a lot of great information already out there (most notably font squirrel which has awesome resources) so the need may not be there. More soon!
AM Vintage – E-commerce & Build
An e-commerce project I’ve been working on with andwhat has just gone live. AM vintage, an online vintage shopping experience offers a wide selection of affordable, good quality vintage clothing and accessories. Originally featured in the ASOS marketplace, they wanted their own home on the internet. The site was designed and branded by andwhat, and marketing is ongoing by them, while Toasted Digital handled the whole build, including the ever super slick FoxyCart part and a few cool jQuery features built in to show off the products.
Foxycart : live cart contents to your site
Since originally writing this tutorial FoxyCart’s 0.7.0 release has made some of this a lot more simple. If you’re on an older version then the tutorial below should be of good use to you, but if you’ve upgraded then there’s a couple of cool new features which make the whole process a lot easier.
The foxycart.js now automatically updates some divs which you can freely place on your page. As long as you have FoxyCart up and running, it’ll work without any extra effort. Simply create the elements within your HTML you require with the following class names or IDs, taken from the FC wiki:
-
#fc_minicart,.fc_minicart: If theFC.json.product_countis greater than 0, these elements will be shown. Otherwise they’ll be hidden -
#fc_quantity,.fc_quantity: The inner HTML will be replaced by the value inFC.json.product_count. -
#fc_total_price,.fc_total_price: The inner HTML will be replaced by the value inFC.json.total_price, formatted using the_currency_formatfunction (which adds decimals but doesn’t add currency symbols).
Nice and simple.
————————————–
Original Tutorial – 10th July 2010 – For FoxyCart versions prior to 0.7.0
————————————————
I’m currently working on a redesign and rebuild of Little Plum, and the CMS of choice has been modx. The cart we’ve chosen to use is FoxyCart, due to how awesomely customisable it has turned out to be. I’ve noticed quite a lack of tutorials on using modx and foxycart together on the web, so after this experience with the Little Plum store I will try and put a few online.
In this post I’m just going to briefly explain how you can get live figures from your FoxyCart cart on your website using the FoxyCart JSON cart object. I’ll get to work on some more in depth tutorials in the future, so keep checking back.This quick tutorial assumes you’ve got your store set up and the foxycart includes already embedded on your page. Check out the foxycart documentation if any info is needed on how to do this.
When you update your cart, FC will call the fc_BuildFoxyCart() function, so whatever we put within this function will be triggered after any interaction with the cart. Create a new js file and insert this function. Include the new js file on your website.
function fc_BuildFoxyCart() { }
So what we want to do in this example, is display how many products we have in our cart, and what the total price is. We want to display this in a div on our website, so we’ll create a div we can write the data to.
<div id="minicart"></div>
In this case, our div id is “#minicart”
Getting data from the foxycart JSON is very simple, in this example we want the product_count and the total_price:
So our fc_BuildFoxyCart() function becomes:
function fc_BuildFoxyCart() { if (fc_json.product_count > 0) { $("#minicart").html("<p>"+fc_json.product_count+" items, £" +fc_json.total_price+"</p>"); } else { $("#minicart").html("<p>0 Items</p>"); } if (fc_json.product_count == 1) { $("#minicart").html("<p>"+fc_json.product_count+" item, £" +fc_json.total_price+"</p>"); } }
Go ahead and update your cart, and watch the details written to the #minicart div. The if handles no items, and a single item., but you can customise this how you like.
This should have given you some basic knowledge on the FoxyCart JSON and how we can use it to get data from the cart onto our sites without needing to access the cart popup itself. For a full view of the JSONstructure, check out this documentation. I’ll be writing some proper tutorials very soon on FoxyCart and modx, so keep checking back!








www.vingebarna.com



