The information in this thread might be outdated
|

01-26-2015, 09:07 PM
|
 |
Member
|
|
Join Date: Jan 2015
Posts: 32
|
|
Populate Quantity box with minimum (other decimal value in stead of 1)
Hi There,
Unfortunately Ecwid does not support minimum or maximum quantity settings yet (would be nice if it finally did!!).
Thanks!
Last edited by Th sp; 09-01-2015 at 08:52 PM.
|
The Following User Says Thank You to pbs For This Useful Post:
|
|

01-28-2015, 02:39 PM
|
 |
Member
|
|
Join Date: Jan 2015
Posts: 32
|
|
No one?
|

01-28-2015, 03:28 PM
|
 |
Paid Member
|
|
Join Date: Oct 2014
Posts: 499
|
|
Quote:
Originally Posted by Th sp
Hi There,
Unfortunately Ecwid does not support minimum or maximum quantity settings yet (would be nice if it finally did!!).
In a work arround I point the user of the minimum required quantity with text of the product description. But of course the shopping experience is far from optimal if the quantity box has a standard value of 1 in stead of e.g. 5. This is very confusing.
So is it possible to populate the quantity box with another (standard) value than 1 in product view? What would be the Javascript to add?
Thanks!
|
Hello!
Well, at the moment Ecwid allows you to set minimum allowed order subtotal (in your Ecwid control panel > System settings > General > Cart section), and it can be used as a workaround to limit the minimum quantity of products purchased.
Yet, populating “quantity” field with some value different from 1 would be possible too with the use of our JavaScript API. Here’s an article on this, that would be of help in case you decide to proceed with this approach http://developers.ecwid.com/api-docu...tom-javascript
Still, the method you suggested (changing quantity field initial value) has its drawbacks, that may be critical:
Nothing prevents your customers from changing “5” quantity to “2”, for example, and if you’ll make this field not editable by customers (which could be done too), they couldn’t choose any different quantity.
As another workaround I can suggest creating, for example, a single product representing 5 items at once, or utilizing product options for this: creating a separate option, that would be used to determine quantity. In practical terms this could look like that: base product for $1, and option with choices like “5 units” (+$4), “6 units”(+$5), and so on.
Last edited by Vitaliy G; 01-04-2016 at 12:40 PM.
|

01-28-2015, 05:25 PM
|
 |
Member
|
|
Join Date: Jan 2015
Posts: 32
|
|
Thank you for replying!
Your first solution: in my case this won't be a good solution because the order total can't be set PER product. It's a global setting?
Will look into the JavaScript API.
I tried it with product options, but I already have some options there. So adding options for quantity does not result in the right total prices. Can this be done with combined product options? (after an upgrade to the business account).
So e.g. Product X has a base price of $1.
A product option of + $2 will increase the unit price to $3.
And a quantity option (5 units) will make a total price of ($3x5=) $15 in stead of (($1x5)+$2=$7)
Thanks.
Last edited by Th sp; 01-28-2015 at 05:28 PM.
|

01-30-2015, 05:09 PM
|
 |
Paid Member
|
|
Join Date: Oct 2014
Posts: 499
|
|
Quote:
Originally Posted by Th sp
Thank you for replying!
Your first solution: in my case this won't be a good solution because the order total can't be set PER product. It's a global setting?
Will look into the JavaScript API.
I tried it with product options, but I already have some options there. So adding options for quantity does not result in the right total prices. Can this be done with combined product options? (after an upgrade to the business account).
So e.g. Product X has a base price of $1.
A product option of + $2 will increase the unit price to $3.
And a quantity option (5 units) will make a total price of ($3x5=) $15 in stead of (($1x5)+$2=$7)
Thanks.
|
You are right, in case other price-modifying options are present, using options for quantity indeed wouldn’t be the best solution.
Regarding product variations: the feature was implemented primarily to ease inventory tracking for products that contain options, since each variation can have a separate stock, which is logical. Another thing that variation can do - assign different weight to each variation, to ease shipping cost calculation, and assign a separate picture to each variation.
Still, I’m afraid using variations in this case won’t do any difference, unless you modify each variation’s price manually (this can be done, but there will be a lot of those variations).
Regarding the possibility to change initial quantity: the problem is that nothing would prevent your customers from changing "5" value back to "1", without even thinking about the reason it was different initially.
|

01-29-2015, 02:42 PM
|
 |
Member
|
|
Join Date: Jan 2015
Posts: 32
|
|
Thanks!
Last edited by Th sp; 09-01-2015 at 08:53 PM.
|

01-31-2015, 02:29 PM
|
 |
Member
|
|
Join Date: Jan 2015
Posts: 32
|
|
I think the populate quantity box method is the best of the worse. I know the user may still change the value (when not fixed) but it provides a better shopping experience. It's confusing when the description mention the minimum required items of 5 and the quantity box has a value of 1.
Last edited by Th sp; 09-01-2015 at 08:54 PM.
|

02-17-2015, 04:14 PM
|
 |
Paid Member
|
|
Join Date: Oct 2014
Posts: 499
|
|
Quote:
Originally Posted by Th sp
Hi Stephan,
Thank you!
I think the populate quantity box method is the best of the worse. I know the user may still change the value (when not fixed) but it provides a better shopping experience. It's confusing when the description mention the minimum required items of 5 and the quantity box has a value of 1.
Could you please help with the javascript: populate the quantity box with 5 for products with productID of e.g. 3432333, 3432332, 4543212. For other products the box should have the default value of 1.
Thank you in advance!
|
Hi!
Sorry for keeping you waiting.
While as support team we are always glad to help with the functionality inside Ecwid, we *normally* do not create custom scripts or integrations ourselves, but instead we provide documentation on API, that has all the information that a person familiar with programming would need to create one. That's why we normally suggest hiring a developer in case a person doesn't think he's up to the task.
Yet, in this case a simple script was required to do the trick, so here it is: when pasted to the source of the page where your store is located, it should set "Qty" value for products with product IDs 3432332, 3432333 and 4543212 to 5 by default. (this code was edited to prevent anyone else from getting a wrong script)
Code:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script>
if (typeof(Ecwid) == 'object') {
Ecwid.OnPageLoaded.add(function(page) {
var pids = [3432333, 3432332, 4543212];
if ('PRODUCT' == page.type)
for(var i=0; i<pids.length; i++) {
if (pids[i]==page.productId)
{
$('input.ecwid-productBrowser-details-qtyTextField').val('5');
}
}
});
}
</script>
Please mind, that this code is presented 'as is' and I am not able to guarantee that it will continue working after future Ecwid updates, so use it at your own choice.
Thank you.
Last edited by enot; 02-18-2015 at 07:32 PM.
Reason: Corrected the code, left a note.
|

02-04-2015, 02:50 PM
|
 |
Member
|
|
Join Date: Jan 2015
Posts: 32
|
|
No one?
|

02-17-2015, 08:05 PM
|
 |
Member
|
|
Join Date: Jan 2015
Posts: 32
|
|
Thanks!
Last edited by Th sp; 09-01-2015 at 08:54 PM.
|
The information in this thread might be outdated
|
Thread Tools |
|
Display Modes |
Hybrid Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT. The time now is 03:24 AM.
Powered by vBulletin® Version 3.8.11. Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
|