Page 66 of 66 FirstFirst ... 1656646566
Results 651 to 660 of 660
  1. #651
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    8,697
    Plugin Contributions
    9

    Default Re: Quick Updates 1.3 ?

    The Categories / Products page uses this code for selecting any ID, Model #, etc. I suppose it could be added into the display page for Quick Updates. Maybe someone more familiar with the php can tell us how.
    Code:
    <div class="col-md-4">
    <?php echo zen_draw_form('set_editor_form', FILENAME_CATEGORY_PRODUCT_LISTING, '', 'get', 'class="form-horizontal"'); ?>
                <div class="form-group">
                  <?php echo zen_draw_label(TEXT_EDITOR_INFO, 'reset_editor', 'class="col-sm-6 col-md-4 control-label"'); ?>
                  <div class="col-sm-6 col-md-8">
                    <?php echo zen_draw_pull_down_menu('reset_editor', $editors_pulldown, $current_editor_key, 'onchange="this.form.submit();" class="form-control" id="reset_editor"'); ?>
                  </div>
                  <?php
                  echo zen_hide_session_id();
                  echo zen_draw_hidden_field('cID', $cPath);
                  echo zen_draw_hidden_field('cPath', $cPath);
                  echo (isset($_GET['pID']) ? zen_draw_hidden_field('pID', $_GET['pID']) : '');
                  echo (isset($_GET['page']) ? zen_draw_hidden_field('page', $_GET['page']) : '');
                  echo zen_draw_hidden_field('action', 'set_editor');
                  ?>
                </div>
                <?php echo '</form>'; ?>
                <?php
                // check for which buttons to show for categories and products
                $check_categories = zen_has_category_subcategories($current_category_id);
                $check_products = zen_products_in_category_count($current_category_id, true, false, 1);
    
    
                $zc_skip_products = false;
                $zc_skip_categories = false;
    
    
                if ($check_products == 0) {
                  $zc_skip_products = false;
                  $zc_skip_categories = false;
                }
                if ($check_categories == true) {
                  $zc_skip_products = true;
                  $zc_skip_categories = false;
                }
                if ($check_products > 0) {
                  $zc_skip_products = false;
                  $zc_skip_categories = true;
                }
    
    
                if (isset($_GET['search']) && !empty($_GET['search']) && $action != 'edit_category') {
                      $zc_skip_products = false;
                }
    
    
                if ($zc_skip_products == true) {
                  // toggle switch for display sort order
                  $categories_products_sort_order_array = array(array('id' => '0', 'text' => TEXT_SORT_CATEGORIES_SORT_ORDER_PRODUCTS_NAME),
                    array('id' => '1', 'text' => TEXT_SORT_CATEGORIES_NAME)
                  );
                } else {
                  // toggle switch for display sort order
                  $categories_products_sort_order_array = array(
                    array('id' => '0', 'text' => TEXT_SORT_PRODUCTS_SORT_ORDER_PRODUCTS_NAME),
                    array('id' => '1', 'text' => TEXT_SORT_PRODUCTS_NAME),
                    array('id' => '2', 'text' => TEXT_SORT_PRODUCTS_MODEL),
                    array('id' => '3', 'text' => TEXT_SORT_PRODUCTS_QUANTITY),
                    array('id' => '4', 'text' => TEXT_SORT_PRODUCTS_QUANTITY_DESC),
                    array('id' => '5', 'text' => TEXT_SORT_PRODUCTS_PRICE),
                    array('id' => '6', 'text' => TEXT_SORT_PRODUCTS_PRICE_DESC)
                  );
                }
                echo zen_draw_form('set_categories_products_sort_order_form', FILENAME_CATEGORY_PRODUCT_LISTING, '', 'get', 'class="form-horizontal"');
                ?>
                <div class="form-group">
                  <?php echo zen_draw_label(TEXT_CATEGORIES_PRODUCTS_SORT_ORDER_INFO, 'reset_categories_products_sort_order', 'class="col-sm-6 col-md-4 control-label"'); ?>
                  <div class="col-sm-6 col-md-8">
                    <?php echo zen_draw_pull_down_menu('reset_categories_products_sort_order', $categories_products_sort_order_array, $reset_categories_products_sort_order, 'onchange="this.form.submit();" class="form-control" id="reset_categories_products_sort_order"'); ?>
                  </div>
                  <?php
                  echo zen_hide_session_id();
                  echo zen_draw_hidden_field('cID', $cPath);
                  echo zen_draw_hidden_field('cPath', $cPath);
                  echo (isset($_GET['pID']) ? zen_draw_hidden_field('pID', $_GET['pID']) : '');
                  echo (isset($_GET['page']) ? zen_draw_hidden_field('page', $_GET['page']) : '');
                  echo (isset($_GET['search']) ? zen_draw_hidden_field('search', $_GET['search']) : '');
                  echo zen_draw_hidden_field('action', 'set_categories_products_sort_order');
                  ?>
                </div>
                <?php
                echo '</form>';
    
    
                if (!isset($_GET['page'])) {
                  $_GET['page'] = '';
                }
                if (isset($_GET['set_display_categories_dropdown'])) {
                  $_SESSION['display_categories_dropdown'] = $_GET['set_display_categories_dropdown'];
                }
                if (!isset($_SESSION['display_categories_dropdown'])) {
                  $_SESSION['display_categories_dropdown'] = 0;
                }
                ?>
              </div>

  2. #652
    Join Date
    Jul 2012
    Posts
    345
    Plugin Contributions
    0

    Default Re: Quick Updates 1.3 ?

    Quote Originally Posted by dbltoe View Post
    The Categories / Products page uses this code for selecting any ID, Model #, etc. I suppose it could be added into the display page for Quick Updates. Maybe someone more familiar with the php can tell us how.
    Code:
    <div class="col-md-4">
    <?php echo zen_draw_form('set_editor_form', FILENAME_CATEGORY_PRODUCT_LISTING, '', 'get', 'class="form-horizontal"'); ?>
                <div class="form-group">
                  <?php echo zen_draw_label(TEXT_EDITOR_INFO, 'reset_editor', 'class="col-sm-6 col-md-4 control-label"'); ?>
                  <div class="col-sm-6 col-md-8">
                    <?php echo zen_draw_pull_down_menu('reset_editor', $editors_pulldown, $current_editor_key, 'onchange="this.form.submit();" class="form-control" id="reset_editor"'); ?>
                  </div>
                  <?php
                  echo zen_hide_session_id();
                  echo zen_draw_hidden_field('cID', $cPath);
                  echo zen_draw_hidden_field('cPath', $cPath);
                  echo (isset($_GET['pID']) ? zen_draw_hidden_field('pID', $_GET['pID']) : '');
                  echo (isset($_GET['page']) ? zen_draw_hidden_field('page', $_GET['page']) : '');
                  echo zen_draw_hidden_field('action', 'set_editor');
                  ?>
                </div>
                <?php echo '</form>'; ?>
                <?php
                // check for which buttons to show for categories and products
                $check_categories = zen_has_category_subcategories($current_category_id);
                $check_products = zen_products_in_category_count($current_category_id, true, false, 1);
    
    
                $zc_skip_products = false;
                $zc_skip_categories = false;
    
    
                if ($check_products == 0) {
                  $zc_skip_products = false;
                  $zc_skip_categories = false;
                }
                if ($check_categories == true) {
                  $zc_skip_products = true;
                  $zc_skip_categories = false;
                }
                if ($check_products > 0) {
                  $zc_skip_products = false;
                  $zc_skip_categories = true;
                }
    
    
                if (isset($_GET['search']) && !empty($_GET['search']) && $action != 'edit_category') {
                      $zc_skip_products = false;
                }
    
    
                if ($zc_skip_products == true) {
                  // toggle switch for display sort order
                  $categories_products_sort_order_array = array(array('id' => '0', 'text' => TEXT_SORT_CATEGORIES_SORT_ORDER_PRODUCTS_NAME),
                    array('id' => '1', 'text' => TEXT_SORT_CATEGORIES_NAME)
                  );
                } else {
                  // toggle switch for display sort order
                  $categories_products_sort_order_array = array(
                    array('id' => '0', 'text' => TEXT_SORT_PRODUCTS_SORT_ORDER_PRODUCTS_NAME),
                    array('id' => '1', 'text' => TEXT_SORT_PRODUCTS_NAME),
                    array('id' => '2', 'text' => TEXT_SORT_PRODUCTS_MODEL),
                    array('id' => '3', 'text' => TEXT_SORT_PRODUCTS_QUANTITY),
                    array('id' => '4', 'text' => TEXT_SORT_PRODUCTS_QUANTITY_DESC),
                    array('id' => '5', 'text' => TEXT_SORT_PRODUCTS_PRICE),
                    array('id' => '6', 'text' => TEXT_SORT_PRODUCTS_PRICE_DESC)
                  );
                }
                echo zen_draw_form('set_categories_products_sort_order_form', FILENAME_CATEGORY_PRODUCT_LISTING, '', 'get', 'class="form-horizontal"');
                ?>
                <div class="form-group">
                  <?php echo zen_draw_label(TEXT_CATEGORIES_PRODUCTS_SORT_ORDER_INFO, 'reset_categories_products_sort_order', 'class="col-sm-6 col-md-4 control-label"'); ?>
                  <div class="col-sm-6 col-md-8">
                    <?php echo zen_draw_pull_down_menu('reset_categories_products_sort_order', $categories_products_sort_order_array, $reset_categories_products_sort_order, 'onchange="this.form.submit();" class="form-control" id="reset_categories_products_sort_order"'); ?>
                  </div>
                  <?php
                  echo zen_hide_session_id();
                  echo zen_draw_hidden_field('cID', $cPath);
                  echo zen_draw_hidden_field('cPath', $cPath);
                  echo (isset($_GET['pID']) ? zen_draw_hidden_field('pID', $_GET['pID']) : '');
                  echo (isset($_GET['page']) ? zen_draw_hidden_field('page', $_GET['page']) : '');
                  echo (isset($_GET['search']) ? zen_draw_hidden_field('search', $_GET['search']) : '');
                  echo zen_draw_hidden_field('action', 'set_categories_products_sort_order');
                  ?>
                </div>
                <?php
                echo '</form>';
    
    
                if (!isset($_GET['page'])) {
                  $_GET['page'] = '';
                }
                if (isset($_GET['set_display_categories_dropdown'])) {
                  $_SESSION['display_categories_dropdown'] = $_GET['set_display_categories_dropdown'];
                }
                if (!isset($_SESSION['display_categories_dropdown'])) {
                  $_SESSION['display_categories_dropdown'] = 0;
                }
                ?>
              </div>
    Thank you but I tried this code earlier and search worked but when search is perform it shows results on categories page instead of quick updates page where can not update item quickly like on quick update page.

    I see earlier in this thread few people mentioned about search via UPC but their provided links (years ago) are not valid nor they have provided codes / solution in this forum. I messaged them but have not heard back. Any one know how to accomplish this?

  3. #653
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,427
    Plugin Contributions
    11

    Default Re: Quick Updates 1.3 ?

    Quote Originally Posted by jsarwar View Post
    Thank you but I tried this code earlier and search worked but when search is perform it shows results on categories page instead of quick updates page where can not update item quickly like on quick update page.

    I see earlier in this thread few people mentioned about search via UPC but their provided links (years ago) are not valid nor they have provided codes / solution in this forum. I messaged them but have not heard back. Any one know how to accomplish this?
    what would you like to accomplish with UPCs? are they already in your database? or do you need them to get into the db and then be able to search by them afterwards?

    best.
    mxWorks now has premium plugins
    are you using square? have you shown any appreciation with cake on venmo or on paypal?
    called the savior by the chief bottle washer...

  4. #654
    Join Date
    Jul 2012
    Posts
    345
    Plugin Contributions
    0

    Default Re: Quick Updates 1.3 ?

    Looking to insert a search box on this page (quick update) where an item can be search using name/model/UPC and then update that item quickly on this page. Item name, model, upc are already in database just need search box on this item to search an item and update quickly.

  5. #655
    Join Date
    Jul 2012
    Posts
    345
    Plugin Contributions
    0

    Default Re: Quick Updates 1.3 ?

    Quote Originally Posted by carlwhat View Post
    what would you like to accomplish with UPCs? are they already in your database? or do you need them to get into the db and then be able to search by them afterwards?

    best.
    Any update on this?

  6. #656
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,427
    Plugin Contributions
    11

    Default Re: Quick Updates 1.3 ?

    Quote Originally Posted by jsarwar View Post
    Any update on this?
    yes. i did look at it (i have never used this module before); but not something to which i can currently devote my time.

    if i were to go about it, i would utilize the soon to be merged (one hopes) search box code for v158:

    https://github.com/zencart/zencart/pull/3948

    and then utilize the new function in v158 called zen_build_keyword_where_clause:

    https://github.com/zencart/zencart/b...ons_search.php

    so you would add 2 new separate files into your install, check that they get loaded, then add the search box in the quick updates code; and then take the post variables from that to modify the sql where statement.

    piece of steak! (unless u r a vegetarian....)

    best.
    mxWorks now has premium plugins
    are you using square? have you shown any appreciation with cake on venmo or on paypal?
    called the savior by the chief bottle washer...

  7. #657
    Join Date
    Jan 2004
    Posts
    66,350
    Blog Entries
    7
    Plugin Contributions
    271

    Default Re: Quick Updates 1.3 ?

    Quote Originally Posted by carlwhat View Post
    if i were to go about it, i would utilize the soon to be merged (one hopes) search box code for v158:

    https://github.com/zencart/zencart/pull/3948

    and then utilize the new function in v158 called zen_build_keyword_where_clause:

    https://github.com/zencart/zencart/b...ons_search.php
    Hmmm ... be careful when toying with unreleased code from newer versions when updating code on older versions. Sometimes things get moved around and have incompatibilities when used out of context. And remember that the unreleased code from newer versions may change many times before being finally released and therefore won't be an exact match when attempting to apply the upgrade. Use with caution.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  8. #658
    Join Date
    Jul 2012
    Posts
    345
    Plugin Contributions
    0

    Default Re: Quick Updates 1.3 ?

    Quote Originally Posted by carlwhat View Post
    yes. i did look at it (i have never used this module before); but not something to which i can currently devote my time.

    if i were to go about it, i would utilize the soon to be merged (one hopes) search box code for v158:

    https://github.com/zencart/zencart/pull/3948

    and then utilize the new function in v158 called zen_build_keyword_where_clause:

    https://github.com/zencart/zencart/b...ons_search.php

    so you would add 2 new separate files into your install, check that they get loaded, then add the search box in the quick updates code; and then take the post variables from that to modify the sql where statement.

    piece of steak! (unless u r a vegetarian....)

    best.
    It did not work for 1.5.3. I uploaded files you mentioned on links above. If any one know the solution please let me know.

  9. #659
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    8,697
    Plugin Contributions
    9

    Default Re: Quick Updates 1.3 ?

    Quote Originally Posted by jsarwar View Post
    It did not work for 1.5.3. I uploaded files you mentioned on links above. If any one know the solution please let me know.
    Not a surprise at all. Four major releases since then and MANY versions of PHP.

    It's really time to update. Six years is a long time in softwareville.

  10. #660
    Join Date
    Jul 2007
    Posts
    339
    Plugin Contributions
    7

    Default Re: Quick Updates 1.3 ?

    Zencart 1.5.7d PHP 7.4
    Can anyone help with this php warning:
    PHP Warning: sizeof(): Parameter must be an array or an object that implements Countable in /admin/quick_updates.php on line 202.
    line 202 is
    if(sizeof($_POST['quick_updates_new']) > 0){

    // bof prepare al new data for database input
    if(sizeof($_POST['quick_updates_new']) > 0){
    foreach($_POST['quick_updates_new'] as $key => $value){
    // $value is an array here (contains values like ['products_model'][$products_id] = '1' for example)
    $_POST['quick_updates_new'][$key] = zen_db_prepare_input($value);
    }
    }
    // eof prepare al new data for database input

    Thanks

 

 
Page 66 of 66 FirstFirst ... 1656646566

Similar Threads

  1. Quick Updates
    By jayson.gurney in forum All Other Contributions/Addons
    Replies: 49
    Last Post: 1 Mar 2008, 11:08 AM
  2. Quick Updates 2.0*
    By Doodlebuckets in forum All Other Contributions/Addons
    Replies: 4
    Last Post: 6 Jun 2007, 01:32 PM
  3. Quick Updates
    By tuckerm in forum Customization from the Admin
    Replies: 11
    Last Post: 16 Dec 2006, 11:45 PM

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