Selling in Fractions?

curtis_blondin
New Member
4 0 0

Okay I’ve been trying to figure this out for a while now.  I operate a fabric store and website. In our store we sell by the quarter meter but online we sell by the half-meter. Currently I have a drop down menu with two options Fat quarter (which is essentially a square of fabric) and half meter. So if a customer wants 4 meters of fabric lets say they would need to add 8 half meters to the cart. (Here is a link to an example: http://fabricationsottawa.com/collections/patterned/products/anna-maria-horner-cracking-codes-jade) I would like to be able to have a drop down that allows people to choose their own quantities in ¼ meter increments but still be able to track the quantities without having to adjust 40 different variations. Something like this. http://www.purlsoho.com/purl/products/item/9305-Birch-Fabrics-Charley-Harper

Is this at all doable or am I setting myself up for disaster. I would appreciate any advice anyone could give me at all.

<!--EndFragment-->

0 Likes
rpw
Shopify Partner
72 0 10

Hi Curtis,

You could probably do this with some javascript to update the quantity... this is all off the top of my head.

In Shopify, you would essentially have ONE variant of a ¼ meter (250cm) priced at $3.75

You would then need to make a select menu which lists every single possibility embedded within your product template (I suggest this is done as a snippet/include). Something like this.

<select id="meterSelect">
  <option value="1">250cm</option>
  <option value="2">500cm</option>
  <option value="3">750cm</option>
  <option value="4">1000cm</option>
  <option value="5">1250cm</option>
  <option value="6">1500cm</option>
   .... and so on, up to the maximum you can conceivably ship
</select>

Then in the actual shopify form - you would make the quantity field a text input (give it an id of quantity), and hide it.

You would then need some javascript to read the select menu value - and also read the price of the main variant.... and then update the hidden #quantity field.

So if I choose 1meter, the javascript would update the hidden quantity to 4, and the price should also update (depending on your template).

The javascript will vary depending on your template (how you have things set up etc... and I've not looked at the source of your template) but if doing it with jquery, something like this should do:

$('#meterSelect').change(function() {
   var $this = $(this);
   $('#quantity').val($this.val());
});

This basically grabs the value of #meterSelect, and stuffs it into quantity. It will require some modifications to your template, but they're not huge... shouldn't take longer than an hour to do.

Hope that helps - and if you need further help, I can ping you my email.

Cheers,
Rob

0 Likes
Sur_La_Spice
Tourist
4 0 1


Rob -
I noticed you posted a suggestion regarding selling by fractional increments.  I own a small spice company and we are challenged by this same issue.  We would like to sell our products in grams, ounces, fluid ounces and pound.  We have installed the Bold app for variants but its not working. 
Can you tell me if your solution worked and what it would cost us to implement it?  I noticed you are a partner so I am assuming that you do this type of thing for hire. What would the cost be to apply this to my website?
Keith 

 

Hi Curtis,

You could probably do this with some javascript to update the quantity... this is all off the top of my head.

In Shopify, you would essentially have ONE variant of a ¼ meter (250cm) priced at $3.75

You would then need to make a select menu which lists every single possibility embedded within your product template (I suggest this is done as a snippet/include). Something like this.

<select id="meterSelect"> <option value="1">250cm</option> <option value="2">500cm</option> <option value="3">750cm</option> <option value="4">1000cm</option> <option value="5">1250cm</option> <option value="6">1500cm</option> .... and so on, up to the maximum you can conceivably ship </select>

Then in the actual shopify form - you would make the quantity field a text input (give it an id of quantity), and hide it.

You would then need some javascript to read the select menu value - and also read the price of the main variant.... and then update the hidden #quantity field.

So if I choose 1meter, the javascript would update the hidden quantity to 4, and the price should also update (depending on your template).

The javascript will vary depending on your template (how you have things set up etc... and I've not looked at the source of your template) but if doing it with jquery, something like this should do:

$('#meterSelect').change(function() { var $this = $(this); $('#quantity').val($this.val()); });

This basically grabs the value of #meterSelect, and stuffs it into quantity. It will require some modifications to your template, but they're not huge... shouldn't take longer than an hour to do.

Hope that helps - and if you need further help, I can ping you my email.

Cheers,
Rob

0 Likes
rpw
Shopify Partner
72 0 10
Hi Curtis, More than happy to discuss this with you... Sorry for the brevity of this reply... I'm currently waiting for a bus and its difficult to type on my phone. Many thanks, Rob
0 Likes
Propero
Shopify Partner
802 92 136

Here is a demo of a solution for this thread

https://sale-by-weight.myshopify.com

password: sbw

- Was my reply helpful? Click Like or Click Accept as Solution
To hire: email us at shopify@propero.in
checkout our app https://apps.shopify.com/picamaze
0 Likes