Start a new topic

change quantity in quote vallet

Often I quote out products with out knowing how many the client needs.


Is there a way to have the end user change the quantity of an item in a quote in the same way that you create an order form?


Yes, I often do this, requires a tweak to the QuoteValet HTML template though.

How good is your HTML/CSS

Pretty passable.  I know it well enough to know what I am looking at but not enough to just start creating from scratch.  


If I know what to change and how I can usually get it done. 

Suggest create a new test QV template.


Add the below to your <head>


<style>

        /*

        Conditional Line Item Qty Editing

        ----------------------------------------------

        This css is used in conjunction with the

        data-qty-condition attribute and additional

        fields found below in the 'Begin_LineTypeProduct'

        and 'Begin_LineTypeGroupHeaders' portions

        of the Line Items Section down below.

        */

        td.col-qty[data-qty-condition="y"] span,

        td.col-qty[data-qty-condition="Y"] span,

        td.col-qty[data-qty-condition="n"] input,

        td.col-qty[data-qty-condition="N"] input,

        td.col-qty[data-qty-condition=""] input

        {

            display:none;

        }

        td.col-qty[data-qty-condition="n"] span,

        td.col-qty[data-qty-condition="N"] span,

        td.col-qty[data-qty-condition=""] span,

        td.col-qty[data-qty-condition="y"] input,

        td.col-qty[data-qty-condition="Y"] input

       {

            display:inline-block !important;

            text-align: center;

     width: 30px;

font-family:"Segoe UI";

margin-left:-4px;

margin-top:-3px;

        }

        /*

        ----------------------------------------------

        */

    </style>


then set your QTY field to:


  <td class="col-qty" data-qty-condition="[DI_CustomText14]"><span>[DI_QtyBase]</span>[DI_QtyBase:InputType=TextBox,style="display:none;"]</td>


Wherever you enter a "Y" into CustomText14 (or whichever field) on the QW line item, it'll then appear as a textbox for the client to change QTY.


Let me know if you get stuck.

Alternatively, I'm around for the next 30 minutes if you want an online screensharing session and I'll do it for you:

https://www.fastsupport.com/829629618


matt@prestigequoting.com

QuoteWerks MVP


1 person likes this

OMG this is exactly what I was looking for, you are amazing!!!

My pleasure. I've done some cool stuff around options, like change the colour of text of optional items to highlight them to the client moreso than just a text box.

I've now added a couple of options using javascript, validating the range, and using a drop down rather than a text box. 




1 person likes this

Hi John,


As part of your Javascript, are you detecting if there are user-selectable quantities?


When there are option items, next to the PDF we have wording warning that optional items selected aren't automatically reflected in the PDF, and to ask for a revised copy in the comments.


But that text doesn't appear if you have no optional items, but you DO have user-selectable quantities.


I'm looking for a way to ensure that text is presented, as it's totally relevant for the same reason.

Hey Darrin,


Yes, with Javascript it's entirely possible to do this sort of 'validation' and show (or not) the text you need.

I've done this several times for various types of scenario.


I'm sure John will jump in here soon.

Pretty much anything is possible in this regard. TBH I've not worried about the fact that the PDF doesn't reflect the changes the client makes, and have never had any issues from customers. 


I suspect you could do this just with CSS without any javascript. Add a text block with display:none when it's not a user changeable quantity, and display:block when it is. The fact that it is user changeable should have a css style you could use to do this.


I'm also not using the QuoteWerks option to specify the user can change the quantity. I was doing that using a custom field. (being honest, I stole some of the ideas off Matt when he worked for his previous employer!) I will change this when I next do a major changes, which probably will be making the QuoteValet template fully responsive. Just got a few other projects in the queue ahead of it!

Unfortuately, the one [DI_QtyBase] is used for both hard-coded quantities and user selectable. It's not treated in the same way as say [QV_OptionBox] with the check built in using [Begin_IsInteractive]. 


Realistically, and the most elegant/simple is if QW builds this into the code, so that [Begin_IsInteractive] can be utilised in exactly the same way.


I can't see any easy way unless Javascript can specifically look to see if the <td class="col-qty"> column has an input box?

Login or Signup to post a comment