Page 144 of 154 FirstFirst ... 4494134142143144145146 ... LastLast
Results 1,431 to 1,440 of 1535
  1. #1431
    Join Date
    Jul 2018
    Location
    Singapore
    Posts
    5
    Plugin Contributions
    0

    Default Re: Dynamic Price Updater

    Hi Chrome,

    A big thank you for this marvellous plugin! I've installed it on zc ver 1.5.5f and it is working as designed for.

    I need some help for my custom script. I've added plus and minus buttons to the product quantity and uses jquery to update the quantity input. My custom script is still working but I couldn't get it to update the price. Could you help me please?

    HTML Code:
    <div id="cartAdd">
    <h2 id="productPrices" class="productGeneral">S$8.00</h2>
    <span id="button-minus" class="addqty-minus">-</span>
    <input id="addqty" class="addqtycart" type="text" name="cart_quantity" value="1" maxlength="6" size="4">
    <span id="button-plus" class="addqty-plus">+</span>
    <input type="hidden" name="products_id" value="1">
    <input class="cssButton submit_button button button_in_cart" onmouseover="this.className='cssButtonHover button_in_cart button_in_cartHover'" onmouseout="this.className='cssButton submit_button button button_in_cart'" type="submit" value="Add to Cart">
    </div>

    Javascript:
    $(document).ready(function() {
    var chkqty = $('#addqty').val();
    $("#button-minus").click(function(){
    var addqty = $('#addqty').val();
    if(parseInt(addqty)>1) {
    var newval = parseInt(addqty) - 1;
    $('#addqty').val(newval);
    return true;
    }else{
    return false;
    }
    });
    $('#button-plus').click(function(){
    var addqty = $('#addqty').val();
    var newval = parseInt(addqty) + 1;
    $('#addqty').val(newval);
    return true;
    });
    });

    Hope you or someone could help me, thank you guys!

  2. #1432
    Join Date
    Jul 2012
    Posts
    14,693
    Plugin Contributions
    17

    Default Re: Dynamic Price Updater

    Quote Originally Posted by preluvbags View Post
    Hi Chrome,

    A big thank you for this marvellous plugin! I've installed it on zc ver 1.5.5f and it is working as designed for.

    I need some help for my custom script. I've added plus and minus buttons to the product quantity and uses jquery to update the quantity input. My custom script is still working but I couldn't get it to update the price. Could you help me please?

    HTML Code:
    Code:
    <div id="cartAdd">
       <h2 id="productPrices" class="productGeneral">S$8.00</h2>
       <span id="button-minus" class="addqty-minus">-</span>
       <input id="addqty" class="addqtycart" type="text" name="cart_quantity" value="1" maxlength="6" size="4">
       <span id="button-plus" class="addqty-plus">+</span>
       <input type="hidden" name="products_id" value="1">
       <input class="cssButton submit_button button button_in_cart" onmouseover="this.className='cssButtonHover button_in_cart button_in_cartHover'" onmouseout="this.className='cssButton submit_button button  button_in_cart'" type="submit" value="Add to Cart">
    </div>
    Javascript:
    Code:
    $(document).ready(function() {
       var chkqty = $('#addqty').val();
       $("#button-minus").click(function(){
          var addqty	= $('#addqty').val();
          if(parseInt(addqty)>1) {
             var newval	= parseInt(addqty) - 1;
             $('#addqty').val(newval);
             return true;
          }else{
             return false;
          }
       });
       $('#button-plus').click(function(){
          var addqty	= $('#addqty').val();
          var newval	= parseInt(addqty) + 1;
          $('#addqty').val(newval);
          return true;
       });
     });
    Hope you or someone could help me, thank you guys!
    The javascript code that has been added to modify some number related to the overall product quantity, does not force the actions to occur for the updated entry. In the above code, the val is updated, but javascript does not take action on that programattic change. It would take action if the user had specifically modified the field directly. I have also not forced a change of the val to cause such an update, leaving someone that writes such additional code to incorporate the necessary action.

    See below (untested) what I think would fix this issue for your site:
    Code:
    $(document).ready(function() {
       var chkqty = $('#addqty').val();
       $("#button-minus").click(function(){
          var addqty	= $('#addqty').val();
          if(parseInt(addqty)>1) {
             var newval	= parseInt(addqty) - 1;
             $('#addqty').val(newval);
             $('#addqty').change();
             return true;
          }else{
             return false;
          }
       });
       $('#button-plus').click(function(){
          var addqty	= $('#addqty').val();
          var newval	= parseInt(addqty) + 1;
          $('#addqty').val(newval);
          $('#addqty').change();
          return true;
       });
     });
    I added a manual call to the change event for the field being edited by the addition of:
    Code:
    $('#addqty').change();
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...
    Upgraded to Zen Cart V1.5.3 from V1.5.1 from V1.5.0 from V1.3.9h

  3. #1433
    Join Date
    Jul 2018
    Location
    Singapore
    Posts
    5
    Plugin Contributions
    0

    Default Re: Dynamic Price Updater

    Hi mc12345678,

    Thank you so much for your super fast response. I tried adding $('#addqty').change() but no luck; it still couldn't update.

  4. #1434
    Join Date
    Jul 2012
    Posts
    14,693
    Plugin Contributions
    17

    Default Re: Dynamic Price Updater

    Quote Originally Posted by preluvbags View Post
    Hi mc12345678,

    Thank you so much for your super fast response. I tried adding $('#addqty').change() but no luck; it still couldn't update.
    Have a link to an effected page?
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...
    Upgraded to Zen Cart V1.5.3 from V1.5.1 from V1.5.0 from V1.3.9h

  5. #1435
    Join Date
    Jul 2018
    Location
    Singapore
    Posts
    5
    Plugin Contributions
    0

    Default Re: Dynamic Price Updater

    Quote Originally Posted by mc12345678 View Post
    Have a link to an effected page?
    Apology, it's internal server at the moment so I don't have an external link for you to access. Is there any other way I could get around this?

  6. #1436
    Join Date
    Jul 2012
    Posts
    14,693
    Plugin Contributions
    17

    Default Re: Dynamic Price Updater

    Quote Originally Posted by preluvbags View Post
    Apology, it's internal server at the moment so I don't have an external link for you to access. Is there any other way I could get around this?
    Well, I was wondering if there were javascript errors that were causing it not to function properly. Does DPU still function properly if the user manually updates the quantity field while your script is installed? Also is what has been provided for code all that is added to support the additional functionality?
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...
    Upgraded to Zen Cart V1.5.3 from V1.5.1 from V1.5.0 from V1.3.9h

  7. #1437
    Join Date
    Jul 2018
    Location
    Singapore
    Posts
    5
    Plugin Contributions
    0

    Default Re: Dynamic Price Updater

    Quote Originally Posted by mc12345678 View Post
    Well, I was wondering if there were javascript errors that were causing it not to function properly. Does DPU still function properly if the user manually updates the quantity field while your script is installed? Also is what has been provided for code all that is added to support the additional functionality?
    Yes, that's correct. DPU is working as intended and there isn't any js error; no other js has been added till yet.

  8. #1438
    Join Date
    Jul 2012
    Posts
    14,693
    Plugin Contributions
    17

    Default Re: Dynamic Price Updater

    Quote Originally Posted by preluvbags View Post
    Yes, that's correct. DPU is working as intended and there isn't any js error; no other js has been added till yet.
    Ok, so went and reproduced the code/situation. While there may still be a better way to implement this, what I did that worked was to instead modify the javascript code like so:
    Code:
    $(document).ready(function() {
        var chkqty = $('#addqty').val();
        $("#button-minus").click(function(){
           var addqty    = $('#addqty').val();
           if(parseInt(addqty)>1) {
              var newval    = parseInt(addqty) - 1;
              $('#addqty').val(newval);
              try {
                 init();
              } catch (call_err) {
                 console.log(call_err.stack);
              }
             return true;
           }else{
              return false;
           }
        });
        $('#button-plus').click(function(){
           var addqty    = $('#addqty').val();
           var newval    = parseInt(addqty) + 1;
           $('#addqty').val(newval);
           try {
              init();
           } catch (call_err) {
              console.log(call_err.stack);
           }
          return true;
        });
      });

    This worked for me and would update after every increase/decrease made by clicking the + or -.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...
    Upgraded to Zen Cart V1.5.3 from V1.5.1 from V1.5.0 from V1.3.9h

  9. #1439
    Join Date
    Jul 2018
    Location
    Singapore
    Posts
    5
    Plugin Contributions
    0

    Default Re: Dynamic Price Updater

    Quote Originally Posted by mc12345678 View Post
    Ok, so went and reproduced the code/situation. While there may still be a better way to implement this, what I did that worked was to instead modify the javascript code like so:
    Code:
    $(document).ready(function() {
        var chkqty = $('#addqty').val();
        ...

    This worked for me and would update after every increase/decrease made by clicking the + or -.
    Thank you Sir! Works like a charm! Appreciate so much of your precious time for helping me out; once again thank you very much!

  10. #1440
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    7,313
    Plugin Contributions
    8

    Default Re: Dynamic Price Updater

    ZC 1.5.5f PHP 7.1 https://allpecans.com/index.php?main...roducts_id=138

    I've read thru this thread a couple of times trying to figure out how to get this updater to not fire on products that are not priced by attribute. Or, to get it to not fire on individual attributes.

    It's an excellent concept, but at the very least annoying to have the price "bouncing around" as you make changes/selections that have no change whatsoever to the price. At its scariest point, I wonder if it violates 508 accessibility in the possible blink rate when adding text. Certain colors blinking at specific rates can result in seizures. I agree that this is stretching things a bit, but having seen a flashing screen cause a seizure makes me understand why 508 specifies no blinking at certain rates. https://webaim.org/articles/seizure

    In the link above, it's possible that an unaware typist could set off an improper flicker by typing a Gift Message. Again, I agree that this is worst case scenario. I think that most would agree that it is at least distracting.

    In earlier portions of the thread, it was intimated that there were ways of turning off the properties of DPU. Some threads mentioned removing the plus sign. I have not been successful in finding any way to turn this off individually.

    Best case in the above example would be to not fire DPU at all as the item is not priced by attributes. However, even an item priced by attributes might need to turn off one attribute. The Gift Message at https://allpecans.com/index.php?main...roducts_id=115 being an example.

    Not having the expertise to mess with jscript_dynamin_price_updater.php, I'm hoping some of you have suggestions.

    THANX
    Last edited by dbltoe; 6 Aug 2018 at 12:41 PM. Reason: links
    Did you read the posting tips?!?
    Responsive Color Changes for 155-156c demo here.
    Zen Cart PCI Compatible Hosting

 

 

Similar Threads

  1. v151 Help with dynamic price updater
    By anderson6230 in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 23 Jul 2014, 08:52 AM
  2. v139h Dynamic Price Updater 3.0 Help!
    By Newbie 2011 in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 12 Mar 2014, 06:46 AM
  3. Dynamic Price Updater Error
    By Inxie in forum All Other Contributions/Addons
    Replies: 4
    Last Post: 26 Oct 2012, 06:19 PM
  4. Alternative to Dynamic Price Updater?
    By thebigkick in forum General Questions
    Replies: 0
    Last Post: 9 Jul 2012, 11:41 PM
  5. Dynamic Price Updater with href
    By maxell6230 in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 1 Mar 2012, 12:34 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR