• Resolved s3eed

    (@s3eed)


    HI
    how can change other button up/down style to( + number -) button like this by add right/left button and remove other text only show number selection
    ex

    – 10 +

    thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Jonas

    (@flinnn)

    Hi, this is not available out of the box. Are you familiar with PHP & WordPress filters? If yes this is doable with some custom overwrites.

    Best,
    Jonas

    Thread Starter s3eed

    (@s3eed)

    thanks for reply

    I worked on modifying the style so that it contains 5 options amount at the top and another button on a line below, and there is enough space to add the +/- button. This is the code I have, so how can I add it?

    I have code so I need filter and add to snipper coder to works thanks

    <div class="number-input">
      <button onclick="this.parentNode.querySelector('input[type=number]').stepDown()" ></button>
      <input class="quantity" min="0" name="quantity" value="1" type="number">
      <button onclick="this.parentNode.querySelector('input[type=number]').stepUp()" class="plus"></button>
    </div>

    Plugin Author Jonas

    (@flinnn)

    So the process works as follows. Please be aware that this is only for advanced/expert users.

    1. Remove the comment in line 88 of /includes/templates/wcdp_product_settings.php
    2. Select “Expert: custom code with action: wcdp_custom_html_amount” in “Layout of Amount suggestions” in the product settings and save the product
    3. Use the action wcdp_custom_html_amount
    4. Make sure that the input field has id=”wcdp-donation-amount” and name=”wcdp-donation-amount”
Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘change the up/down increment/decrement’ is closed to new replies.