Jump to content


  • Content count

  • Joined

  • Last visited

Everything posted by pchem

  1. pchem

    reCAPTCHA for v2.2 RC2a

    I trying to install a Google reCaptcha v2 in my old v2.2 RC2a store since there doesn't seem to be a reCaptcha v3 available (this v2.3 add on didn't function since the admin side boxes would not display (https://apps.oscommerce.com/M93NH&amp;google-recaptcha-v3). So, I'm using the 19th September 2016 template found here: https://apps.oscommerce.com/DMTEK&amp;google-recaptcha-2-0&amp;v=22 It directs you to open catalog/includes/template_top.php and find <script type="text/javascript" src="ext/jquery/jquery.stringball.js"></script> . The file template_top.php doesn't exist in my store. I believe it is a typo? Is it suppose to be applications_top.php? If not where should I put that javascript? Otherwise, is there an easy way to just upgrade the v1 add on that is currently on my site (https://apps.oscommerce.com/tYsNN) to a v2 or v3 reCAPTCHA?
  2. pchem

    HoneyPot Captcha

    Thanks again Jack! I got the contact_us.php working with the revision you provided. At about line 309 in create_account.php I ended up just trying the code recommended in the install file even though the commands looked quite a bit different, and it seems to be working fine.
  3. pchem

    HoneyPot Captcha

    Thanks for the add-on @Jack_mcs. I installed the MS2 v1.10 on my v2.2 RC2a based site, but there are some differences I am running into. Emails are not being sent from catalog/contact_us.php and it just returns to the catalog/contact_us.php page like nothing happened. In catalog/contact_us.php the directions state to: FIND: <?php echo tep_draw_form('contact_us', tep_href_link('contact_us.php', 'action=send'), 'post', 'class="form-horizontal"', true); ?> REPLACE WITH: <?php //BEGIN HONEYPOT ?> <?php echo tep_draw_form('contact_us', tep_href_link('contact_us.php', 'action=send'), 'post', ' onsubmit="return validateMyForm();" class="form-horizontal"', true); ?> <?php //END HONEYPOT ?> My version has this on line 105 instead: <?php echo tep_draw_form('contact_us', tep_href_link(FILENAME_CONTACT_US, 'action=send')); ?> I tried to replace it with this: <?php echo tep_draw_form('contact_us', tep_href_link(FILENAME_CONTACT_US, 'action=send'), 'onsubmit="return validateMyForm();"'); ?> Should I have done something different? Likewise, in catalog/create_account.php the directions state to find: <?php echo tep_draw_form('create_account', tep_href_link('create_account.php', '', 'SSL'), 'post', '', true) . tep_draw_hidden_field('action', 'process'); ?> REPLACE WITH: <?php //BOC Honeypot ?> <?php echo tep_draw_form('create_account', tep_href_link('create_account.php', '', 'SSL'), 'post', 'class="form-horizontal" onSubmit="return validateMyForm(create_account);"', true) . tep_draw_hidden_field('action', 'process'); ?> <?php //EOC Honeypot ?> Instead, on line 309 I found: <?php echo tep_draw_form('create_account', tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'), 'post', 'onSubmit="return check_form(create_account);"') . tep_draw_hidden_field('action', 'process'); ?> And changed it to: <?php echo tep_draw_form('create_account', tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'), 'post', 'class="form-horizontal" onSubmit="return validateMyForm(create_account);"',) . tep_draw_hidden_field('action', 'process'); ?> I an getting a syntax error, but I don't know enough to know what is wrong. Will someone please point me in the right direction?
  4. I was able to get the most expensive rate automatically selected by doing the following: In catalog/includes/classes/shipping.php at line 111 I changed: if ($rates[$i]['cost'] < $cheapest['cost']) { To: if ($rates[$i]['cost'] > $cheapest['cost']) { Just the less than "<" to greater than ">" was changed to automatically select the most expensive method radio button. Ideally, I want to change it to automatically select 2-Day for USA and most expensive for rest of world. This idea may work in catalog/includes/classes/shipping.php, but I still do not know how to write the "if, then" statements. Can anyone help me out?
  5. I am using FedEx_1_4-webservices_v9_4_2 on a v2.2 RC2 store. I only ship with FedEx, but I want the 2-day radio button to be automatically selected by default, not cheapest (i.e. Ground Shipping). What code have others used or what can be done to select the radio button by default (other than cheapest) in this FedEx shipping module?
  6. pchem

    FedEx Direct 2.06 Support thread

    My shop is running v2.2 RC2 with FedEx module 2.07 and an update. It acted the same way. What I did to fix this is go to the admin control panel for modules. Click shipping, then Federal Express. Edit the following to suit your needs: Max. weight Max. quantity of ship boxes These values are NOT only for when the FedEx site is disabled, but are also used for the ship separately function. My values were set to low for some of my heavy items. I arbitrarily picked 10 for the number of boxes and 150 pounds. Now it seems to be working fine.
  7. pchem

    FedEx Direct 2.06 Support thread

    Mine acts the same. Any fixes for it?
  8. pchem

    FedEx Direct 2.06 Support thread

    Can anyone please help????
  9. pchem

    Shipping Surcharge for Certain Items

    burt, How would one do this with the FedEx Direct module that I inquired about here.
  10. pchem

    FedEx Direct 2.06 Support thread

    My shop is a v2.2 RC2a with FedEx Direct 2.07 (and upgraded to 2.07.1 with the patch fedex1.php). I only use FedEx as a shipping method. It has worked fine for the last year, but now I need to ship some items separately since they require Hazmat shipping. My problems are now two fold: Problem 1: When I check the "Ship Separately" box for "Product A" in the admin>catalog>Categories/Products product descriptions and either 2 or more of "Product A" are purchased on the website or "Product A" + any other product are purchased together, then no shipping options are offered. One "Product A" alone brings up FedEx just fine at checkout. I have changed the sort order of the FedEx shipping module as outlined here, but it made no difference. What is needed for the "Ship Separately" option to work? Problem 2: I want to add a $20.00 Hazmat surcharge to about 25 specific items in my store. I want these items to ship separately (individually if possible) from non-Hazmat items. If non-Hazmat item are also in the cart, I want the customer to still choose what FedEx service they want for those items. I read about making an array on this post. Has anyone written an array like that for the FedEx Direct module? Where would this array be inserted in catalog>includes>modules>shipping>fedex1.php? Has anyone successfully used Individual Product Shipping Methods or Individual Product Shipping Prices with the FedEx Direct module?
  11. pchem

    Paypal Express Missing Address Line

    I just installed the "Second Address Line" contribution on my store (my site is v2.2 RC2) where I have been using PayPal Direct 1.1. I am still working up to testing the 2nd address, but from this page PayPal suggest that the second address is not required (see Table 4.7 CardOwner: AddressType Fields). Did you get the 2nd address working properly for you?
  12. pchem

    How do you add an 2nd address line?

    I'd try the "Second Address Line" contribution.
  13. I seem to have it working in IE now. I had changed the "Sub level menu" width (width: auto; /*sub menu width*/). Just an FYI...Setting it back to a fixed width may have helped.
  14. Any thoughts? Your help would be greatly appreciated! :)
  15. Thanks again for the contribution. I have it up and running and it works perfectly using Mozilla/Firefox, but with Internet Explorer (IE 6 and IE 7) all the parent categories of the pop out menu are displayed, but many of the children or sub categories are missing. For example the x-linker section has three sub categories, but only two are listed in the menu. Is there a known reason for this?
  16. My Website sells scientific reagents. We have the same description of products that only differ in package size and I want to minimize any potential duplicate content hits. I would like to know if OSC can be modified to list the product information (from catalog/product_info.php) below the listing of products (catalog/index.php). For example, put the information from pages like this for CHCA below the table on the CHCA matrix "Category" page. I would also remove hyperlinks from the table on the CHCA matrix page linking to the CHCA product info page. Is this possible? Or are good templates already available for this layout?
  17. Thanks again Sam! I'll check those out on my demo site and see if I can get the desired effect. I want to eliminate page rank duplicate content penalties that I might be receiving. In some regard I'd like to mimic the effect this site is using. They have parent categories with children products of different packaging sizes, yet there is only one product info page per product. Can anyone tell what contributions might have been used there?
  18. I just put the "RSS Feed" link into my Info Box. It isn't anything fancy as you can see here, but the details on what I did are posted here.
  19. Robert, Thank you for this wonderful contribution. The menu and all site maps work fine. The RSS feed looks good, but only appears to contains feeds from catalog/index.php even though I added the proper code (<link rel="alternate" type="application/rss+xml" href="fwrrss.xml" /> directly below <link rel="stylesheet" type="text/css" href="stylesheet.css">) in the following catalog files: index.php, product_info.php, contact_us.php, conditions.php, privacy.php, shipping.php, sitemap.php, etc. The instructions indicate that code goes in all catalog files that you want included in the RSS feed. Is that correct, or did I misunderstand something? Also, what is the suggested/preferred way to add the RSS button?
  20. Thanks Sam, but I don't think that is exactly what I am after. I'd like something that looks like this or this page. Any other ideas?
  21. Thanks Jack and Robert for your input. I think I figured it out. I had New Google Sitemap Generator (NGS-1.2-misstop.co.uk) which made URLs, but did not add the descriptive content from the category and/or product name. Therefore, Google was prbably getting the redirect error when going from the sitemap and trying to access the optimized page: http://www.XXXXXXX.com/-c-1_17_24.html vs. http://www.XXXXXXX.com/zerolengthcrosslink...-c-1_17_24.html I now have Jack's Google XML Sitemap SEO V 1.1 installed and I am already seeing pages drop from Google's URL error report. Thanks again Jack for that!
  22. Currently, in admin under Configuration "Use Search-Engine Safe URLs (still in development)" is set to False. Is this the correct setting? What are the best settings for "SEO URLs" under Configuration?
  23. I've had the 23 Nov 2008 version of 2.1d ORIGINAL updated on my site since late last year. Initially the Google indexing went way up (top 10 in many cases, even #1), but I have been loosing ground over the last few months (dropping off the charts to 200-300). Google has lots of my links with "URLs not followed" due to "Redirect error" (the same URLs are listed in "Errors for URLs in Sitemaps" also as "Redirect error"). But the URLs work fine (same with the sitemap)! I thought this could be due to duplication errors, but the SEO contrib that I used appears to include the Independent_Seo_Url_Validation_v1.0.4 contrib. Any thoughts that might be causing this problem?
  24. Maestro and Solo cards (MasterCard's debit card in UK and possibly other parts or Europe) were not desired on my site. I cleaned up the look of the page by removing the Credit Card Valid From and Card Issue Number from the PayPal Direct module. To do this I commented out the code at about line 35 & 106 in catalog/inculdes/modules/payment/paypal_direct.php Changed this: $this->cc_types = array('VISA' => 'Visa', 'MASTERCARD' => 'MasterCard', 'DISCOVER' => 'Discover Card', 'AMEX' => 'American Express', 'SWITCH' => 'Maestro', 'SOLO' => 'Solo'); } To this: $this->cc_types = array('VISA' => 'Visa', 'MASTERCARD' => 'MasterCard', 'DISCOVER' => 'Discover Card', 'AMEX' => 'American Express'); // 'SWITCH' => 'Maestro', // 'SOLO' => 'Solo'); **commented out, removed "," after AmEx and then added ");" ** } Changed this: array('title' => MODULE_PAYMENT_PAYPAL_DIRECT_CARD_VALID_FROM, 'field' => tep_draw_pull_down_menu('cc_starts_month', $months_array) . ' ' . tep_draw_pull_down_menu('cc_starts_year', $year_valid_from_array) . ' ' . MODULE_PAYMENT_PAYPAL_DIRECT_CARD_VALID_FROM_INFO), array('title' => MODULE_PAYMENT_PAYPAL_DIRECT_CARD_EXPIRES, 'field' => tep_draw_pull_down_menu('cc_expires_month', $months_array) . ' ' . tep_draw_pull_down_menu('cc_expires_year', $year_expires_array)), array('title' => MODULE_PAYMENT_PAYPAL_DIRECT_CARD_CVC, 'field' => tep_draw_input_field('cc_cvc_nh-dns', '', 'size="5" maxlength="4"')), array('title' => MODULE_PAYMENT_PAYPAL_DIRECT_CARD_ISSUE_NUMBER, 'field' => tep_draw_input_field('cc_issue_nh-dns', '', 'size="3" maxlength="2"') . ' ' . MODULE_PAYMENT_PAYPAL_DIRECT_CARD_ISSUE_NUMBER_INFO))); return $confirmation; } TO THIS: // array('title' => MODULE_PAYMENT_PAYPAL_DIRECT_CARD_VALID_FROM, // 'field' => tep_draw_pull_down_menu('cc_starts_month', $months_array) . ' ' . tep_draw_pull_down_menu('cc_starts_year', $year_valid_from_array) . ' ' . MODULE_PAYMENT_PAYPAL_DIRECT_CARD_VALID_FROM_INFO), array('title' => MODULE_PAYMENT_PAYPAL_DIRECT_CARD_EXPIRES, 'field' => tep_draw_pull_down_menu('cc_expires_month', $months_array) . ' ' . tep_draw_pull_down_menu('cc_expires_year', $year_expires_array)), array('title' => MODULE_PAYMENT_PAYPAL_DIRECT_CARD_CVC, 'field' => tep_draw_input_field('cc_cvc_nh-dns', '', 'size="5" maxlength="4"'))); // array('title' => MODULE_PAYMENT_PAYPAL_DIRECT_CARD_ISSUE_NUMBER, // 'field' => tep_draw_input_field('cc_issue_nh-dns', '', 'size="3" maxlength="2"') . ' ' . MODULE_PAYMENT_PAYPAL_DIRECT_CARD_ISSUE_NUMBER_INFO)); } This change works on my site and I hope others will also find it useful!
  25. I am using PayPal direct (US) and it processes credit cards fine, but it lacks the error message when any fields are incomplete. The standard pink box shows up, but no text is present nor the error.gif. I want customers to know why they might not be proceeding to the confirmation page. Feel free to check it out at mysite. The test account is "test@test.com" and the PW is "2test". I'll be very grateful if someone can help. This code is present in catalog/includes/languages/english/modules/payment/paypal_direct.php and appears fine: define('MODULE_PAYMENT_PAYPAL_DIRECT_ERROR_ALL_FIELDS_REQUIRED', 'Error: All payment information fields are required.'); The code surrounding MODULE_PAYMENT_PAYPAL_DIRECT_ERROR_ALL_FIELDS_REQUIRED in catalog/includes/modules/payment/paypal_direct.php is as follows: starting at line 119: function pre_confirmation_check() { if (MODULE_PAYMENT_PAYPAL_DIRECT_CARD_INPUT_PAGE == 'Payment') { global $HTTP_POST_VARS; if (!isset($HTTP_POST_VARS['cc_owner']) || empty($HTTP_POST_VARS['cc_owner']) || (strlen($HTTP_POST_VARS['cc_owner']) < CC_OWNER_MIN_LENGTH) || !isset($HTTP_POST_VARS['cc_type']) || !isset($this->cc_types[$HTTP_POST_VARS['cc_type']]) || !isset($HTTP_POST_VARS['cc_number_nh-dns']) || empty($HTTP_POST_VARS['cc_number_nh-dns']) || (strlen($HTTP_POST_VARS['cc_number_nh-dns']) < CC_NUMBER_MIN_LENGTH)) { $payment_error_return = 'payment_error=' . $this->code . '&error=' . urlencode(MODULE_PAYMENT_PAYPAL_DIRECT_ERROR_ALL_FIELDS_REQUIRED) . '&cc_owner=' . urlencode($HTTP_POST_VARS['cc_owner']) . '&cc_starts_month=' . $HTTP_POST_VARS['cc_starts_month'] . '&cc_starts_year=' . $HTTP_POST_VARS['cc_starts_year'] . '&cc_expires_month=' . $HTTP_POST_VARS['cc_expires_month'] . '&cc_expires_year=' . $HTTP_POST_VARS['cc_expires_year']; tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, $payment_error_return, 'SSL', true, false)); } } return false; } function confirmation() { $confirmation = array(); starting at line 281: if (($response_array['ACK'] != 'Success') && ($response_array['ACK'] != 'SuccessWithWarning')) { tep_redirect(tep_href_link(FILENAME_SHOPPING_CART, 'error_message=' . stripslashes($response_array['L_LONGMESSAGE0']), 'SSL')); } } else { tep_redirect(tep_href_link(FILENAME_CHECKOUT_CONFIRMATION, 'error_message=' . MODULE_PAYMENT_PAYPAL_DIRECT_ERROR_ALL_FIELDS_REQUIRED, 'SSL')); } } function after_process() { return false; } function get_error() { if (MODULE_PAYMENT_PAYPAL_DIRECT_CARD_INPUT_PAGE == 'Payment') { global $HTTP_GET_VARS; $error = array('error' => stripslashes(urldecode($HTTP_GET_VARS['error']))); return $error; } return false; }