Jump to content

ecartz

♥Ambassador
  • Content count

    2,003
  • Joined

  • Last visited

  • Days Won

    3

Reputation Activity

  1. Like
    ecartz got a reaction from JcMagpie in display number of items per page   
    I don't think that is the right place.  Look for
    $listing_split = new splitPageResults($listing_sql, MAX_DISPLAY_SEARCH_RESULTS, 'p.products_id'); and replace it with
    if (!tep_session_is_registered('max_products_per_page')) tep_session_register('max_products_per_page'); if (!isset($max_products_per_page) || !is_integer($max_products_per_page) || ($max_products_per_page < 1)) $max_products_per_page = MAX_DISPLAY_SEARCH_RESULTS; if (isset($HTTP_GET_VARS['mppp']) && is_numeric($HTTP_GET_VARS['mppp']) && ($HTTP_GET_VARS['mppp'] > 0)) $max_products_per_page = intval($HTTP_GET_VARS['mppp']); $mppp_list = array(); for ($i = 1; $i <= 5; $i += 1) { //change $i <= 5 to show more or less page options, default is 5 (Example: 12, 24, 36, 48, 60 (total: 5 options)) $mppp = intval($i * 12); //change $i * 12 for products shown per page, default is 12 $mppp_list[] = array('id' => $mppp, 'text' => $mppp); } $mppp_list[] = array('id' => 9999999, 'text' => TEXT_ALL_ITEMS); $gvhf = ''; $ignore = array('page', 'mppp'); if (is_array($HTTP_GET_VARS) && (sizeof($HTTP_GET_VARS) > 0)) { reset($HTTP_GET_VARS); while (list($key, $value) = each($HTTP_GET_VARS)) { if ( (strlen($value) > 0) && ($key != tep_session_name()) && (!in_array($key, $ignore)) ) { $gvhf .= tep_draw_hidden_field($key, $value); } } } $maxpppform = tep_draw_form('prod_per_page', basename($PHP_SELF), 'get') . $gvhf . tep_draw_pull_down_menu('mppp', $mppp_list, $max_products_per_page, 'class="form-control input-sm" style="width:70px;" onchange="this.form.submit()"') . '</form>'; $listing_split = new splitPageResults($listing_sql, $max_products_per_page, 'p.products_id'); Then put the
    <form class="form-inline pull-right"> <label class="control-label"><?php echo TEXT_SHOW; ?></label> <?php echo $maxpppform; ?> </form> Wherever you have it now (so long as it is after the other code that you added), as that is working. 
    It's also worth noting that Edge already has a version of this.  You might check to see if Frozen does as well.  If so, you might be better off just updating to Frozen rather than trying to figure out how to implement this.  Another thing is that you may want to replace $HTTP_GET_VARS with $_GET everywhere that it appears.  And there may be similar issues that aren't leaping out at me. 
  2. Like
    ecartz got a reaction from Psytanium in Cokies in backend and configure   
    Cookie domain should be just a domain like .oscommerce.com or forums.oscommerce.com
    A cookie path of / is probably correct.  Sometimes it might be something like /catalog or similar.  In general, / is enough so long as you aren't running other web software on the same domain.  The problem that you would see then would be the two software applications confusing each other by stomping on each other's cookies.  That's when you might want to restrict the cookies to just the /catalog path. 
    If you force cookies, that means that people who have cookies turned off won't work with your site.  It can occasionally fix things if the software is diagnosing cookies as disabled but they really exist.  But it is more likely to break things. 
    Similar problem: 
     
  3. Like
    ecartz got a reaction from Demitry in HeaderScroll addon - need help with default setting   
    According to Mozilla at https://developer.mozilla.org/en-US/docs/Web/API/Storage/getItem
    You can say instead: 
    // HeadScroll save checkbox state to session $(function(){ $('#scroll').each(function() { var $el = $(this); var $checked = sessionStorage.getItem($el.prop('id')); if ($checked === null) { sessionStorage.setItem($el.prop('id'), 'true'); } $el.prop('checked', sessionStorage[$el.prop('id')] === 'true'); }); $('#scroll').on('change', function() { var $el = $(this); sessionStorage[$el.prop('id')] = $el.is(':checked'); }); }); I haven't tried this.  This is just from looking at docs. 
  4. Thanks
    ecartz got a reaction from rulegacy in Keeping Error Logs Clean   
    The first warning seems to be telling you that $cPath_array is not an array.  This usually means that it is missing a
    $cPath_array = array(); That may need to appear much higher in the file (or even in a different file) though, as it needs to appear before anything is put in the variable.  Perhaps put it above the application_top.php include in index.php.  You could also surround this line with
    if (is_array($cPath_array)) { } But that may just shift or delay the problem. 
    The second warning seems to be saying that the delivery country is a string, not an array.  Either change it to
    $dest_country = $order->delivery['country']; Or set $order-delivery to be an array.  This may be a sign that an add-on was installed incorrectly.  It seems to be getting set the old way but the module is querying it the new way.  If you used an order.php file from an older add-on, it may set it the old way. 
    The third warning is telling you that either $shipping_weight is set to a non-numeric value or SHIPPING_BOX_WEIGHT is or is not defined at all.   An add-on may be missing a database change that should have been made.  You could hard code something like
    define(SHIPPING_BOX_WEIGHT, 3); and the error might disappear.  But then you won't be able to edit the value without changing this code.  Better would be to make the change in the database. 
    Also, make sure that you don't have it configured as something like "3 lbs".  That value should be purely numeric.  No units.  So just 3 or whatever number is appropriate. 
    The fourth warning is telling you that $$link is not set properly.  This should probably be fatal but seems to be happening only in the admin area, possibly intermittently.  If you can make it happen consistently under some circumstances, that would be easier to diagnose. 
  5. Like
    ecartz got a reaction from sandipmakwana in Quantity box with plus and minus buttons   
    Does the plus/minus buttons contribution actually update the cart without a page refresh? Or does it instead update the page and then you submit the quantity when you click the add to cart button (which refreshes the page)?
     
    And the fast update contribution submits the page every time you delete a product or change the quantity, right? So you want to be able to make all your quantity updates before updating the cart (like you would normally do)? There might be user confusion in that they will have changed the quantity on the page but never submitted the page so that it is not updated on the server.
     
    What happens on a delete? Should it update the quantities? Or just delete the item? I think that the way it works now, you would have to update the quantities, just as if you had clicked the update cart button. Or you would need to remove the instant delete so that it only deletes when you click on the update cart button (the original way that the cart worked). Or you would need to redo the instant delete functionality (unfortunately without help from the plus/minus contribution, which doesn't deal with multiple products).
     
    Does it sound like I'm understanding what you want to do? I haven't used these particular contributions previously, so I may be misunderstanding somewhere.
  6. Like
    ecartz got a reaction from caminho in Basic Template Structure 1.7   
    When I upload it, BTS 1.7 will be updated to the 2.2 RC2a standards. From the changelog:
    The Basic Template Structure location in the contributions area remains the same.  
    There is no functional improvement in this release. The only changes are to increase compatibility with RC2a. Therefore, no upgrade instructions have been provided. If you are using an older version, you can continue to do so. If you launch a new RC2a store, you can use this version.
×