• 12th September 2018

Achieving the seemingly impossible

Achieving the seemingly impossible

Achieving the seemingly impossible 900 624 Editor

Yesterday (Tuesday) was one of those days when things just aren’t all going to plan.  We had a situation of an ecommerce website that had an upsell section added to it.

So you see the product page you are on, with Buy Now, price and so on – the usual things.  But within that, are check boxes to add other products to the cart… at the same time.  For example:  A radio controlled, with the Upsell of some big batteries and some improved compatible tyres.  The idea is the customer clicks on those too, and when they add to basket, it adds all three items rather than just the one.

Big Sales Upsell Method

It worked for this website many moons ago on a non-Wordpress platform.
This time round they are using a plugin, but it had one major glitch – it didn’t work well for Variables.

If they had the option of Red, Blue and Black, that suddenly made the Checkbox area show TWICE.  We couldn’t mess with the code, and the people behind the plugin said it wasn’t compatible with variables.

They asked us if we could ‘hide’ the first or second set of check boxes, but the answer (or so we thought) was no.

After some research (and a lot of hard work) we are pleased to say we found a fix.  We found a smart method of hiding the second row (literally telling it which row ‘number’ to hide’, but then allow just the first row to show.  It sounded impossible, as the styling code cannot run ‘queries’… (count how many there are, add another piece to the code to highlight the others and then hide them).  This cannot be done within digging into the plugin of someone’s code… which could be over written by an update!

We have written code like this before, we you tell it ‘ever 4th row to do x’, but this could not be done in that way.

magic css coding

Smart Website Thinking

So we found another way – a better way.  We shan’t go into the details, as those who wrote it might be asking us for help to make it possible, but it’s a genius bit of coding, only 9 lines long.  They now have a product page with one block of upsell products; better still, they can reduce the price of those upsell products ONLY when it is part of an upsell!

ie  the batteries are £3.99, but if bought with this car, they are £3.49.

We are really proud of the finished result.  It generated big sales for them on the old website, and now they have it on this one, we hope the same will happen.

Smart thinking.  Not giving up.  Paracetamol.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.