Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

ecartz

♥Ambassador
  • Posts

    3,864
  • Joined

  • Last visited

  • Days Won

    69

Everything posted by ecartz

  1. Can't you just change the text that you send to PayPal? That would be a coding change, but that's the only way that you can change just what PayPal gets. Note that the "bug" is that PayPal doesn't accept values more than 256 characters (a character is a letter or other mark). So to fix that, you'd have to fix PayPal. It's a limitation in PayPal, not in osCommerce.
  2. <script>$(document).ready(function(){ $('button[name="wishlist"]').bind('click', function() { let input = document.createElement('input'); input.setAttribute('type', 'hidden'); input.setAttribute('name', 'wishlist'); input.setAttribute('value', 'wishlist'); let form = $(this).parents('form:first'); form.appendChild(input); form.submit(); return false; }}); </script> I think that this would fix it. To test it, you could add this into the existing header tag module with which you are having trouble, as that already adds scripts to the footer. But you might then want to move it into its own module or hook after establishing that it works. The problem is that the AJAX submission is not passing which button was clicked to submit the form. Which makes sense because there is only one button in the default install. So if Javascript is running, this adds a form input to the form when that button is clicked.
  3. The problem is that it needs to submit the form to get the attributes. I.e. submitting the form is the correct behavior here. The issue is that it needs to submit the form differently when it is a wishlist from when it is adding to cart. Note that if people are already using AJAX to submit the form, then they can use Javascript to change the form submission URL or to add a "Wishlist" input that is only posted with the Wishlist. Then the current behavior would be a fall back for the non-Javascript case.
  4. Which line is 313? Perhaps try changing if(MODULE_SHIPPING_FEDEX_WEB_SERVICES_RATES == 'LIST') // For LIST/FULL Rates, calculate the cost as below { to if (('LIST' === MODULE_SHIPPING_FEDEX_WEB_SERVICES_RATES) && (is_countable($rateReply->RatedShipmentDetails))) { // For LIST/FULL Rates, calculate the cost as below
  5. I'm pretty sure that this only happens in some browsers. You may want to find out where @kgtee has this installed and check the behavior there. Or post what browser you're using so people trying to debug can use the same one.
  6. function CheckCountryState($state, $country) { if (MODULE_HEADER_TAGS_HONEYPOT_VERIFY_STATE_COUNTRY_MATCH == 'True') { $has_zone_query = tep_db_query("SELECT COUNT(*) AS zone_count FROM zones WHERE zone_country_id = " . (int)$country); $has_zone = tep_db_fetch_array($has_zone_query); if (0 < $has_zone['zone_count']) { $db_query = tep_db_query("select 1 from zones where zone_country_id = " . (int)$country . " and (zone_code = '" . tep_db_input($state) . "' or zone_name = '" . tep_db_input($state) . "')"); return !tep_db_num_rows($db_query); } } return false; }
  7. 1.0.5.4 is on GitHub for those who would like to install it from scratch (as opposed to updating). 

  8. Have you tried installing osC 3 to see if the variations system supported what you need? I ask because porting the variations system to Phoenix seems like something that is both feasible and generally desirable. Not trivial, but possible.
  9. The problem is not that it needs to be updated with every increment. The problem is that the current version of this module requires a core change (to admin/modules.php ). So every time that the modules.php file gets updated, it wipes out the core change which then needs to be reapplied. This could be fixed by adding a hook file or database defined hook to replace the core change. The hook point was added in this commit. But no one has updated the package with that. @greasemonkey uses that hookpoint for another module requiring the same change. Someone could also modify the module to use the standard form: https://github.com/gburton/CE-Phoenix/blob/master/admin/modules.php#L40..L42. That might avoid the need for a hook. But again, no one has updated the module to to do that.
  10. 1.0.5.3 is available on GitHub for those who want to do a fresh install (as opposed to an upgrade). 

  11. 1.0.5.2 does not change how the tep_session functions work. But if you want to write them out, the code would look like if (!isset($_SESSION['wishList']) || !($wishList instanceof wishlist)) { $_SESSION['wishList'] = new wishlist(); $wishList =& $_SESSION['wishlist']; } But I don't think that has anything to do with the issue. Note that the part that prevents the add to cart action is if (isset($_POST['wishlist'])) { If that condition is true, then it redirects the page. If it is not true, it keeps going until it reaches the add to cart action. So there's really only two things that can be going wrong. One, that condition is not being set. Two, the redirect is failing in some fashion without showing an error. The first is far more likely and suggests some kind of browser issue. For example, Lee may be using a different browser than you. Or have different browser settings. Or perhaps some other issue unrelated to the browser. For example, if Lee is using Internet Explorer, perhaps you are hitting https://stackoverflow.com/a/1903505
  12. I would just delete the entire line 107. It's complaining that it can't find do_magic_quotes_gpc. I'm not sure that line actually does anything necessary even with Search-Engine Safe URLs turned on. So just delete it. And I would turn Search-Engine Safe URLs off, as that never left the experimental stage and has long since been obsolete. Search engines have been able to handle GET parameters for at least fifteen years. The 1.0.5.2 version of includes/application_top.php is going to be preferable to the 1.0.5.0 version. Things have moved. New things have been added. It would be difficult to get it working with 1.0.5.2. The problem with the hooks class is only the beginning.
  13. Turn off Search-Engine Safe URLs. Or delete that line. Or copy do_magic_quotes_gpc() from an older version (e.g. 1.0.5.0). It would be in includes/functions/compatibility.php
  14. You type @ and then the person's username. E.g. @dculley -- just as it looks. It will change the color and background automatically. You may need to have Javascript enabled for it to recognize the format.
  15. Try <td class="main"><?php echo tep_draw_input_field('stores_title', ($cInfo->stores_title ?? null), 'maxlength="255" required="required" aria-required="true"'); ?></td> The default could also be an empty string or something else. But I think that null works there and that pattern can be used to keep the current behavior and suppress the notice. You're essentially saying, "Yes, I know it's sometimes not set. But I don't care when that happens." The true is an argument that used to exist but has been removed from core, so delete it and add to the input parameters as shown. In general, if your admin tep_draw_input_field call has more than three arguments, you should probably post it so it can be rewritten.
  16. $stores_query = tep_db_query($stores_query_raw); while ($stores = tep_db_fetch_array($stores_query)) { if (!isset($cInfo) && (!isset($_GET['sID']) || ($_GET['sID'] == $stores['stores_id']))) { $cInfo = new objectInfo($stores); }
  17. What version of osCommerce are you using?
  18. 1.0.5.2 is on GitHub for anyone who wants to do a fresh install (as opposed to an upgrade from a previous version). 

    1. valquiria23

      valquiria23

      Hi Matt

      Thank you very much for this news and for trying to move forward oscommerce.

      Where can I see what improvements 1.0.5.2 has over old versions?
      Without knowing what improvements a new release has, it is not attractive for new users to try the change and the new versions.

      BR

      Valqui

  19. foreach($this->modules as $value) { $class = pathinfo($value, PATHINFO_FILENAME); $GLOBALS[$class] = new $class(); } } }
  20. If you post the reset and while each lines (probably 28 and 29), someone might be able to give a suggestion.
  21. The error will tell you what it should be. For example if that is the correct value, then the error will tell you that it is using /data/www/my_website/public_html/ext/modules/header_tags/twitter_typeahead/includes/hooks When you see the ext/modules/ part, you know that the part that you want is to the left of it. It should end with a /
  22. Or actually, remove the entire build email step // lets start with the email confirmation $email_order = STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $order_id . "\n" . EMAIL_TEXT_INVOICE_URL . ' ' . tep_href_link('account_history_info.php', 'order_id=' . $order_id, 'SSL', false) . "\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n"; if ($order->info['comments']) { $email_order .= tep_db_output($order->info['comments']) . "\n\n"; } $email_order .= EMAIL_TEXT_PRODUCTS . "\n" . EMAIL_SEPARATOR . "\n" . $products_ordered . EMAIL_SEPARATOR . "\n"; for ($i = 0, $n = sizeof($order_totals); $i < $n; $i++) { $email_order .= strip_tags($order_totals[$i]['title']) . ' ' . strip_tags($order_totals[$i]['text']) . "\n"; } if ($order->content_type != 'virtual') { $email_order .= "\n" . EMAIL_TEXT_DELIVERY_ADDRESS . "\n" . EMAIL_SEPARATOR . "\n" . tep_address_format($order->delivery['format_id'], $order->delivery, false, '', "\n") . "\n"; } $email_order .= "\n" . EMAIL_TEXT_BILLING_ADDRESS . "\n" . EMAIL_SEPARATOR . "\n" . tep_address_format($order->billing['format_id'], $order->billing, false, '', "\n") . "\n\n"; $email_order .= EMAIL_TEXT_PAYMENT_METHOD . "\n" . EMAIL_SEPARATOR . "\n"; $email_order .= $this->title . "\n\n"; if ($this->email_footer) { $email_order .= $this->email_footer . "\n\n"; } tep_mail($order->customer['name'], $order->customer['email_address'], EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); // send emails to other people if (SEND_EXTRA_ORDER_EMAILS_TO != '') { tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); } and replace it with tep_notify('checkout', $order); as done in PayPal or in checkout_process.php.
  23. I think that a better solution to this would be to fix the DIR_FS_CATALOG value in includes/configure.php to not change with the location of the calling page. Then you can leave the files inside ext. Note that the install procedure already does this.
×
×
  • Create New...