Support » Plugin: Min Max Quantity & Step Control Single » The plugin changes the initial value of the quantity to zero

  • Resolved chadrex

    (@chadrex)


    The plugin changes the original value of the quantity to zero. This bug happens if you just click “Submit” on the page /wp-admin/admin.php?page=wcmmq_s_min_max_step

    ОТDisabling the plugin fixes the situation, most likely there is writing unnecessary settings in the database. Please fix it

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter chadrex

    (@chadrex)

    For example, let’s compare two bases, before lick submit and after click submit.

    (1314, 'wcmmq_s_universal_minmaxstep', 'a:7:{s:21:\"_wcmmq_s_min_quantity\";i:1;s:21:\"_wcmmq_s_max_quantity\";b:0;s:21:\"_wcmmq_s_product_step\";i:1;s:22:\"_wcmmq_s_msg_min_limit\";s:34:\"Minimum quantity should %s of \"%s\"\";s:22:\"_wcmmq_s_msg_max_limit\";s:34:\"Maximum quantity should %s of \"%s\"\";s:35:\"_wcmmq_s_msg_max_limit_with_already\";s:32:\"You have already %s item of \"%s\"\";s:28:\"_wcmmq_s_min_qty_msg_in_loop\";s:14:\"Minimum qty is\";}', 'yes'),

    (1314, 'wcmmq_s_universal_minmaxstep', 'a:5:{s:22:\"_wcmmq_s_msg_min_limit\";s:34:\"Minimum quantity should %s of \"%s\"\";s:22:\"_wcmmq_s_msg_max_limit\";s:34:\"Maximum quantity should %s of \"%s\"\";s:35:\"_wcmmq_s_msg_max_limit_with_already\";s:32:\"You have already %s item of \"%s\"\";s:28:\"_wcmmq_s_min_qty_msg_in_loop\";s:14:\"Minimum qty is\";s:21:\"_wcmmq_s_min_quantity\";s:1:\"0\";}', 'yes'),

    The problem is that there is a global parameter change _wcmmq_s_min_quantity (zero at the end of the second example)

    Thread Starter chadrex

    (@chadrex)

    not sure, but here is the solution to my problem (I guess)

            if( !$data['_wcmmq_s_min_quantity'] || $data['_wcmmq_s_min_quantity'] == '0' || $data['_wcmmq_s_min_quantity'] == 0 ){
               $data['_wcmmq_s_min_quantity'] = 1; 
            }

    in the file
    \wp-content\plugins\woo-min-max-quantity-step-control-single\admin\set_menu_and_fac.php (72-74)

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.