It depends on how your "b" variant are implemented. Separate pages are difficult to test, whereas javascript transformations are much easier.
Here is some general advice, hope it helps:
Javascript method:
All of your product pages should share similar CSS selectors.
For example, if you are changing all buttons on all product pages you could use generic code $('.add-to-cart').css({ background: 'green'})
that will change all buttons to green instead of worrying about each product page individually.
Separate pages method:
This is trickier. There are two ways to do this.
1) You could split traffic server-side, but you'd have to code this all manually and won't be able to use an easy a/b testing software for this.
if (has cookie) { make sure they see the same thing as last time}
else { generate a or b randomly, if b, then redirect to b page. set cookie}
2) Use Javascript to redirect 50% of traffic from A to B:
<!-- first hide your default page so the visitor doesn't see both versions -->
<style id='some-id'>html,body {visibility:hidden}</style>
<script>
if (visitor is in version B) {
// redirect if needed
location.replace(http://site.com/new-page.php);
} else {
// un-hide if they should not be redirected
$('#some-id').remove();
}
</script>