Jump to content

ecartz

♥Ambassador
  • Content count

    2,007
  • Joined

  • Last visited

  • Days Won

    3

ecartz last won the day on November 26 2018

ecartz had the most liked content!

7 Followers

Profile Information

Recent Profile Visitors

38,417 profile views
  1. ecartz

    Redundant Code ???

    You are correct. That code, as written, does nothing, so your revised version will have the exact same behavior. I don't know if that was always true or if the code behaved differently previously.
  2. ecartz

    Redundant Code ???

    SID is a session constant: https://www.php.net/manual/en/session.constants.php It is set if and only if the session is not set in a cookie. So if it is never set when you look at it, that probably means that you always allow the session cookie. If you, and all your customers, always allow the session cookie, then it is redundant for you. It is not redundant for those of us who want to support customers (like me) that do not necessarily enable the session cookie. I don't understand what you mean. What is the actual problem that you are facing? When you click a certain link, you get a redirect? When you click any link, you get a redirect? Does the redirect terminate? Or do you get stuck in a redirect loop? Can you use the site normally thereafter? Or not? If the session cookie is set, then you shouldn't need the session ID in the URL. The only reason that you might need it is if you were going between HTTPS and HTTP. But in admin, you shouldn't have to do that. It should always be HTTPS. So for the common case, that section of code doesn't do anything. For a rare case, it will allow one to browse the admin even with cookies turned off.
  3. ecartz

    How to restart or change a value in a session

    This would be a lot easier to make suggestions if you told us what you changed to make it work if the county is entered and never changed. Also, what are you trying? It might be easier to explain why that doesn't work than to try to explain in the abstract how to make it so it does work. The normal method to do this would be to use zone-based tax. If the zone isn't getting updated properly, that might be a bug in osCommerce. What version are you using?
  4. ecartz

    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.
  5. ecartz

    Payment Modules Issues

    Some things to try: 1. Does Authorize.net work? I.e. at least let you get to the confirmation page (as I understand it, you're stuck on the payment page). If not, this might be a PHP 5.6 issue, as that's what changed. 2. Have you tried using a diff program like ExamDiff or Kdiff3 to check if the core payment files have been changed? I would try this before trying an update or fresh install. 3. Have you checked compatibility of the payment modules? I.e. are they supposed to work with 2.3.3? I notice that there are modules for Stripe and Authorize.net that are currently part of the distribution. Are you using the Stripe module from 2.3.3? Or a different one? It's possible that 2.3.3 did not have Stripe included. You'd have to download it and check. 4. Have you found that error message in the source files? What sends it? Why? If you have an if statement with multiple clauses, break it up into smaller pieces with different error messages (for debugging; plan to restore the original file later). 5. Make a copy of the site on another domain name and with a separate database. Then try to update that. Then you can see how difficult that is. When I see "edited core", I think of systems like Drupal which use hooks instead of direct code edits. The osCommerce system has relatively few hooks. So "editing core" is often the only way that people can change functionality at all.
  6. ecartz

    Voice search strategies

    The biggest thing that you can do to help voice search is look at what search criteria are actually being used on your site and optimize for them. For example, if you have a lot of searches for blew dresses or fresh meet, make sure that those searches find things listed as blue dresses and fresh meat respectively. You should be doing this kind of thing anyway. But it would currently be focused on typos, like blu dresses or fresh met rather than homophones. Homophones are much more of a problem with voice search, as the voice parser may not always figure out what word is meant. The basic idea is that you track what searches returned no results. Look at them and understand why they failed. For example, if you sell clothes and get a search for fresh meat, that's simple user error that you can ignore. But an empty search for blew or blu dresses when you do have blue dresses is something that should be fixed. You can see this on Amazon and Google. They say something like "Showing results for blew dresses, but did you really mean blue dresses perhaps?" They link to the possible alternative and sometimes they show both results mixed together. When they mix them, they often link both alternatives.
  7. ecartz

    Product image upside down

    That's in the language file (the main one). For example, from includes/languages/english.php, it says: define('HTML_PARAMS', ''); From admin/includes/languages/english.php , it has define('HTML_PARAMS','dir="ltr" lang="en"'); That's left to right. To change to right to left, replace ltr with rtl. Also change the lang to the two letter code for your language. I.e. replace the en with whatever is appropriate. You can read more about the dir parameter to the html tag at https://www.w3.org/International/questions/qa-html-dir There should be a .css file in your catalog directory. Change your fonts in that. It used to be called stylesheet.css but may have been renamed, e.g. to user.css.
  8. ecartz

    product Quantity

    Can you try making just one change at a time? I'd try the language files first. If you get error messages just with the language file changes, please post those errors, the code that you added, and some of the surrounding code for context. If those go through fine, then add the image files. Change admin/categories.php last. And just to be sure we are both on the same page, where it says LANGUAGE, you should be writing something like english, e.g. /admin/includes/languages/english/categories.php
  9. ecartz

    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:
  10. ecartz

    tep_draw_file_field

    Which version of osCommerce are you using? And with what Add-ons? Traditionally image upload has been separate from basic osCommerce, and when I look at https://github.com/gburton/Responsive-osCommerce/blob/master/includes/functions/html_output.php it's not there. I would expect to find it either in https://github.com/gburton/Responsive-osCommerce/blob/master/includes/languages/english.php or https://github.com/gburton/Responsive-osCommerce/blob/master/includes/languages/english/product_info.php But it really depends on where the Add-on might have put it. And of course it depends on how German is stored in your languages. German? Deutsch?
  11. 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.
  12. ecartz

    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.
  13. ecartz

    Shipping/CCGV/PayPal

    It sounds like one of your shipping module or CCGV made changes to checkout_process.php directly rather than via module. You would need to figure out what those changes were and make equivalent changes in paypal_express.php or whatever the name is. I believe the file that you need to modify is under the ext directory, but it's been a while since I've played with it. I believe this is what Tim was suggesting. The short version is that the PayPal files duplicate some of the functionality from checkout_process.php, so add-ons that modify checkout_process.php also require changes to other PayPal files. This is beyond just copying files. You almost certainly have to edit files manually. In the past, I've used a tool called KDiff3 to help me with these kinds of tasks. I leave it up to you whether you want to try to figure out how to make such manual edits or not. Depending on how you value your time and frustration, it may be time to pay someone to do it.
  14. ecartz

    Forum Software Update (31st July 2018)

    It looks like the report post link is in a color that is close to the background color. But if you hover over it, it shows up. It also might show up if you used it recently and it shows the visited color. I didn't try that. I tend to browse with Javascript off, so that might change things too.
  15. ecartz

    DHTML State Selection

    It's not clear to me why the language would make a difference. None of the new SQL queries are language dependent. Also, if I try it on my test site, it works (at least in Spanish and German). Perhaps the problem would be more obvious if you posted a link to the page that is not working?
×