The information in this thread might be outdated
If the solution did not help, please, check our Help Portal or contact Ecwid Team.
 
 
Thread Tools Display Modes
  #1  
Old 05-28-2015, 11:04 PM
NickMoose's Avatar
NickMoose is offline
Junior Member
 
Join Date: May 2015
Posts: 9
Default

Is it possible make the Quantity box default to "2" on just one particular product?


Is it possible make the Quantity box default to "2" on just one particular product?
  #2  
Old 05-29-2015, 11:08 AM
Cyril D's Avatar
Cyril D Cyril D is offline
Ecwid Team
 
Join Date: Feb 2015
Location: Ecwid HQ
Posts: 530
Default

Quote:
Originally Posted by Nick Mucetti View Post
Is it possible make the Quantity box default to "2" on just one particular product?
Hi Nick,

Thanks for reaching us out!

Sure, it can easily be done by adding a special JavaScript code to the page where your Ecwid store installed.

Since your store's added to a Wix website, you should add the code to the "Advanced settings" section of Ecwid app for Wix. Here's the code:

Code:
<script type="text/javascript">
Ecwid.OnPageLoaded.add(function(page) {
  if (page.type == "PRODUCT" && page.productId == PRODUCTID) { // Specify the product ID here
    var qtyField = document.getElementsByClassName("ecwid-productBrowser-details-qtyTextField");
    var qf = qtyField[0];
    qf.value = 2; // Specify the default quantity here
  }
});
</script>
Pay you attention to the "PRODUCTID" string. Replace that string with the product ID that you need. You can find the product ID in browser's address bar when you open a product for editing in the Ecwid control panel → System Settings → Catalog → Products page (see the below screenshot):



And don't forget to change the default quantity value (it's marked in red).

Hope this helps!

In case there are any additional questions or if you need further assistance, feel free to ask.
__________________
Cyril D.
Ecwid Customer Care Team

More tips and hints on Ecwid use in our Help Center

⬇ Please click Thanks if my reply helped you.
 
The information in this thread might be outdated
If the solution did not help, please, check our Help Portal or contact Ecwid Team.

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:18 PM.
Powered by vBulletin® Version 3.8.11. Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.