Make Qty manditory

72 views
Skip to first unread message

Dave Johnson

unread,
Aug 9, 2017, 8:19:13 AM8/9/17
to XMPie Interest Group
Hello,

Anyway to make the qty field mandatory?

thanks

Dave

Sherry Chaudoin

unread,
Aug 9, 2017, 9:16:25 AM8/9/17
to xmpie...@googlegroups.com
I’d love that, too!

--
You received this message because you are subscribed to the Google Groups "XMPie Interest Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xmpie-users...@googlegroups.com.
To post to this group, send email to xmpie...@googlegroups.com.
Visit this group at https://groups.google.com/group/xmpie-users.
For more options, visit https://groups.google.com/d/optout.
NOTICE: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential or privileged information or otherwise be protected by law.  Any unauthorized review, use, disclosure, or distribution is prohibited.  If you are not the intended recipient, please contact the sender by reply e-mail, permanently delete the e-mail from your system, and destroy all copies of the e-mail.  The company has taken reasonable precautions to ensure no viruses are present in this e-mail.  The company disclaims responsibility and liability for any loss or damage arising from the use of this e-mail or attachments.

couch

unread,
Aug 9, 2017, 6:42:45 PM8/9/17
to XMPie Interest Group
Not sure what you mean? Are you saying that a customer can order a product in uStore without setting a quantity? - Surely that is impossible, so i must be misunderstanding your question.

AnwarG

unread,
Aug 10, 2017, 2:54:43 AM8/10/17
to XMPie Interest Group
We added a line of jQuery that changes the qty on 0 after the page loads. It happens quite a few times where customers 'forget' to enter the qty they actually want to order.

$("#ctl00_cphMainContent_txtNumCopies").attr('value', '0')

This will make the qty 'mandatory' as you can't order 0 copies.

Op woensdag 9 augustus 2017 14:19:13 UTC+2 schreef Dave Johnson:

Dave Johnson

unread,
Aug 10, 2017, 1:30:51 PM8/10/17
to xmpie...@googlegroups.com
Thanks! Being a graphic designer I'm not familiar with using jQuery. Where would I find the location for this information to be inserted?

Thanks!

--
You received this message because you are subscribed to a topic in the Google Groups "XMPie Interest Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/xmpie-users/vYZOKi7mFEU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to xmpie-users...@googlegroups.com.

Dave Johnson

unread,
Aug 14, 2017, 12:54:20 PM8/14/17
to xmpie...@googlegroups.com
Hello,

Where do I add this code?

Thanks
Dave

On Thu, Aug 10, 2017 at 2:54 AM AnwarG <anw...@gmail.com> wrote:
--
Message has been deleted

AnwarG

unread,
Aug 15, 2017, 2:37:33 AM8/15/17
to XMPie Interest Group
You will have to go to 'Store Setting' and 'Add Javascript to Storefront'. 

Code to add:

<script type="text/javascript">
  $("document").ready(function() {
    $("#ctl00_cphMainContent_txtNumCopies").attr('value', '0');
    }
 });
</script>

Op maandag 14 augustus 2017 18:54:20 UTC+2 schreef Dave Johnson:

Dave Johnson

unread,
Aug 16, 2017, 9:41:51 AM8/16/17
to xmpie...@googlegroups.com
Hello,

I tried adding the JavaScript below to our store but qty still says 1 as a default. I'm wanting it to say 0 so the customer has to put something in.

Thanks for your help!

Simon Knott

unread,
Aug 16, 2017, 9:53:23 AM8/16/17
to XMPie Interest Group
Hi Dave

Try

<script type="text/javascript">
  $("document").ready(function() {
    $("#ctl00_cphMainContent_txtNumCopies").attr('value', '0');
    });
</script>

Think the previous code had 1 too many }'s

Regards
Simon Knott

Dave Johnson

unread,
Aug 16, 2017, 10:06:29 AM8/16/17
to xmpie...@googlegroups.com
Thanks!

Sherry

unread,
Aug 23, 2017, 9:12:15 AM8/23/17
to XMPie Interest Group
That didn't change anything. Mine still defaults to 1.

Dave Johnson

unread,
Aug 23, 2017, 9:14:48 AM8/23/17
to xmpie...@googlegroups.com
The code given to me the first time had to many }'s

Dave

Sherry Chaudoin

unread,
Aug 23, 2017, 9:18:54 AM8/23/17
to xmpie...@googlegroups.com
I updated the code but got the same result.

You received this message because you are subscribed to the Google Groups "XMPie Interest Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xmpie-users...@googlegroups.com.

To post to this group, send email to xmpie...@googlegroups.com.
Visit this group at https://groups.google.com/group/xmpie-users.
For more options, visit https://groups.google.com/d/optout.

AnwarG

unread,
Aug 24, 2017, 2:44:53 AM8/24/17
to XMPie Interest Group
Sorry guys, the semicolon shouldn't be there either:

<script type="text/javascript">
  $("document").ready(function() {
    $("#ctl00_cphMainContent_txtNumCopies").attr('value', '0')
  });
</script>

Tested this one in a new store and it worked.

Op woensdag 23 augustus 2017 15:18:54 UTC+2 schreef Sherry:
Reply all
Reply to author
Forward
0 new messages