Jump to content

greasemonkey

Members
  • Content count

    1,368
  • Joined

  • Last visited

  • Days Won

    25

Everything posted by greasemonkey

  1. greasemonkey

    Feedback for raiwa

    Just wanted to throw out a big thank you out to @@raiwa. I recently installed his Mobile iOSC addon, found here; http://addons.oscommerce.com/info/8629 and with Rainer`s assistance (actually he did all the work)... integrated with SPPC and QPBPP. Thanks again!
  2. I think I have fixed "the issue" (it is now working the way I expected) by adding the tag back in when there is no mobile session. if ($defaultTags['meta_canonical']) { echo (defined('MOBILE_SESSION')? '' :(tep_not_null($canonical_url) ? ' <link rel="canonical" href="'.$canonical_url.'" >'. "\n" : ' <link rel="canonical" href="'.GetCanonicalURL().'" >'. "\n")); } After; if ($defaultTags['meta_canonical']) { echo (defined('MOBILE_SESSION')? html_entity_decode(str_replace($str_replace_from, $str_replace_to, (tep_not_null($canonical_url) ? ' <link rel="canonical" href="'.$canonical_url.'" >'. "\n" : ' <link rel="canonical" href="'.GetCanonicalURL().'" >'. "\n"))) : ''); } Can anyone else confirm? Or am I "nuts" (wait... don't answer that).
  3. I'm working though debugging this on my test store and I have run into and issue with the header tags support addon. I have added the code as per the instruction however the results for the canonical are not as expected. In the mobile site everything tests good; <!DOCTYPE html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>My Category</title> <meta name="Description" content="My Category Description" /> <meta name="Keywords" content="My, keywords" /> <meta name="robots" content="noodp" /> <meta name="robots" content="noydir" /> <link rel="canonical" href="http://www.mysite.com/sandbox/my-category-c-334.html" > However, in the desktop site I have; <!DOCTYPE html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>My Category</title> <meta name="Description" content="My Category Description" /> <meta name="Keywords" content="My, keywords" /> <meta name="robots" content="noodp" /> <meta name="robots" content="noydir" /> <link rel="alternate" media="only screen and (max-width: 640px)" href="http://www.mysite.com/sandbox/mobile/my-category-mc-334.html"> As you can see the canonical is missing from the desktop site. The code I'm working with is in catelog/includes/header_tags.php // MOBILE URLS REPLACEMENTS FOR CANONICAL URL $str_replace_from = array('-mc-', '-mi-', '-mby-', '-mpr-', '-mpri-', '-mp-', '-mm-', 'catalog_mb.php', 'about.php', 'search.php', 'currencies.php', 'languages.php', 'mobile/', '?redirectCancelled=true', '&redirectCancelled=true'); $str_replace_to = array('-c-', '-i-', '-by-', '-pr-', '-pri-', '-p-', '-m-', 'index.php', 'index.php', 'index.php', 'index.php', 'index.php'); $str_replace_alt_from = array('mobile/', '?redirectCancelled=true', '&redirectCancelled=true'); $str_replace_alt_to = array('mobile/', '', ''); echo (defined('MOBILE_SESSION')? ' <meta http-equiv="Content-Type" content="text/html; charset=' . CHARSET . '" />'."\n" : '<meta http-equiv="Content-Type" content="text/html; charset=' . CHARSET . '">'."\n"); echo ' <title>' . $header_tags_array['title'] . '</title>' . "\n"; echo (defined('MOBILE_SESSION')? ' <meta name="Description" content="' . $header_tags_array['desc'] . '" />' . "\n" : ' <meta name="Description" content="' . $header_tags_array['desc'] . '">' . "\n"); echo (defined('MOBILE_SESSION')? ' <meta name="Keywords" content="' . $header_tags_array['keywords'] . '" />' . "\n" : ' <meta name="Keywords" content="' . $header_tags_array['keywords'] . '">' . "\n"); if ($defaultTags['meta_language']) { $langName = explode(",", $_SERVER["HTTP_ACCEPT_LANGUAGE"]); echo (defined('MOBILE_SESSION')? ' <meta http-equiv="Content-Language" content="' . $langName[0] . '" />'."\n" : ' <meta http-equiv="Content-Language" content="' . $langName[0] . '">'."\n"); } if ($defaultTags['meta_google']) { echo (defined('MOBILE_SESSION')? ' <meta name="googlebot" content="noindex, nofollow" />' . "\n" : ' <meta name="googlebot-mobile" content="noindex, nofollow">' . "\n"); } if ($defaultTags['meta_google']) { echo (defined('MOBILE_SESSION')? ' <meta name="bingbot" content="noindex, nofollow" />' . "\n" : ' <meta name="MSNBOT_Mobile" content="noindex, nofollow">' . "\n"); } if ($defaultTags['meta_google']) { echo (defined('MOBILE_SESSION')? ' <meta name="slurp" content="noindex, nofollow" />' . "\n" : ' <meta name="YahooSeeker/M1A1-R2D2" content="noindex, nofollow">' . "\n"); } if ($defaultTags['meta_noodp']) { echo (defined('MOBILE_SESSION')? ' <meta name="robots" content="noodp" />' . "\n" : ' <meta name="robots" content="noodp">' . "\n"); } if ($defaultTags['meta_noydir']) { echo (defined('MOBILE_SESSION')? ' <meta name="robots" content="noydir" />' . "\n" : ' <meta name="robots" content="noydir">' . "\n"); } if ($defaultTags['meta_revisit']) { echo (defined('MOBILE_SESSION')? ' <meta name="revisit-after" content="1 days" />' . "\n" : ' <meta name="revisit-after" content="1 days">' . "\n"); } if ($defaultTags['meta_robots']) { echo (defined('MOBILE_SESSION')? '' : ' <meta name="robots" content="index, follow">' . "\n"); } if ($defaultTags['meta_unspam']) { echo (defined('MOBILE_SESSION')? ' <meta name="no-email-collection" content="http://www.unspam.com/noemailcollection" />' . "\n" : ' <meta name="no-email-collection" content="http://www.unspam.com/noemailcollection">' . "\n"); } if ($defaultTags['meta_replyto']) { echo (defined('MOBILE_SESSION')? ' <meta name="Reply-to" content="' . STORE_OWNER_EMAIL_ADDRESS . '" />' . "\n" : ' <meta name="Reply-to" content="' . STORE_OWNER_EMAIL_ADDRESS . '">' . "\n"); } if ($defaultTags['meta_canonical']) { echo (defined('MOBILE_SESSION')? html_entity_decode(str_replace($str_replace_from, $str_replace_to, (tep_not_null($canonical_url) ? ' <link rel="canonical" href="'.$canonical_url.'" >'. "\n" : ' <link rel="canonical" href="'.GetCanonicalURL().'" >'. "\n"))) : ''); } //if ($defaultTags['meta_canonical']) echo (tep_not_null($canonical_url) ? ' <link rel="canonical" href="'.$canonical_url.'" >'. "\n" : ' <link rel="canonical" href="'.GetCanonicalURL().'" >'. "\n"); //echo (defined('MOBILE_SESSION')? '' : ( ' <link rel="alternate" media="only screen and (max-width: 640px)" href="'. HTTP_MOBILE_SERVER . str_replace($str_replace_alt_from, $str_replace_alt_to, $mobile_url) .'">'. "\n")); echo (defined('MOBILE_SESSION')? '' : ( ' <link rel="alternate" media="only screen and (max-width: 640px)" href="'. str_replace($str_replace_alt_from, $str_replace_alt_to, $mobile_url) .'">'. "\n")); echo '<!-- EOF: Header Tags SEO Generated Meta Tags -->' . "\n"; I can get the tags to show in the desktop site by reverting back to the org code (you can see it commented out above) if ($defaultTags['meta_canonical']) echo (tep_not_null($canonical_url) ? ' <link rel="canonical" href="'.$canonical_url.'" >'. "\n" : ' <link rel="canonical" href="'.GetCanonicalURL().'" >'. "\n"); However this kills the tag on the mobile site. Am I mis-understanding how the tag should look? Or maybe this is an issue with SEO URL's 5? I have my site NOT redicting to index.php in the URL settings...?
  4. greasemonkey

    Quantity box in product listing 1.2 for 2.3

    I'm not sure what you installed... I would un do it. There should be no new files... Only a couple quick edits to product_info (and product info language file) and application_top. Don't forget to back up first!!!!! This is the one I use; http://addons.oscommerce.com/info/7914 @@The Lego Man
  5. greasemonkey

    Quantity box in product listing 1.2 for 2.3

    Yep, just search the addon area for "Quanity box product info"
  6. greasemonkey

    No-redirect adding to cart - not sure what to call it

    My 11 year old would love your username... Lol. To your question; the answer has 2 parts. 1) the shopping cart redirect is a built in configuration. Look in the admin, configuration, my store. By setting to false the user will remain on the page and not be directed to the cart. 2) there are many shopping cart addons.... Just google, for example; oscommerece shopping cart in header. There's also a shopping cart layer/popup which I used on 2.2 (tooltips... I think it was called) which worked well for what you discribe that I believe has recently been updated to work on 2.3.x - although I haven't tried the update. Good luck.
  7. greasemonkey

    Quantity box in product listing 1.2 for 2.3

    @@The Lego Man, no prob... I've fixed the typo and uploaded as 1.2a.
  8. greasemonkey

    Quantity box in product listing 1.2 for 2.3

    Try changing this; $prod_list_grid .= '<br>' . tep_draw_form('buy_now', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id='. $listing[$x]['products_id']), 'POST') . '<table cellSpacing="0" cellPadding="0" width="100%"><tr><td align="right" width="25%">' . tep_draw_input_field('buyqty', '1', 'size=3 maxlength=3') . '</td><td align="center" width="75%" valign="absmiddle">' . tep_draw_button(IMAGE_BUTTON_BUY_NOW, 'cart') . '<td align="absmiddle">' . '</td></tr></table></form>'; to $prod_list_grid .= '<br>' . tep_draw_form('buy_now', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id='. $listing['products_id']), 'POST') . '<table cellSpacing="0" cellPadding="0" width="100%"><tr><td align="right" width="25%">' . tep_draw_input_field('buyqty', '1', 'size=3 maxlength=3') . '</td><td align="center" width="75%" valign="absmiddle">' . tep_draw_button(IMAGE_BUTTON_BUY_NOW, 'cart') . '<td align="absmiddle">' . '</td></tr></table></form>';
  9. greasemonkey

    Quantity box in product listing 1.2 for 2.3

    @@The Lego Man, so I understand correct... you can get the box to show, it just doesn't work (add to cart)? Have you made the changes to application_top? Also, It may help to show what you changed your code "to" to get it box showing in product_listing...
  10. greasemonkey

    FREE SHIPPING on orders - Module

    You could try to modify Zero Weight Free Shipping... I'm no coder... but a bet a mod to this line - instead of ==0 maybe >100 might work. //BEGIN ZWFS Contribution if (($cart->show_weight() == 0) ) { $free_shipping = true; include(DIR_WS_LANGUAGES . $language . '/modules/order_total/ot_shipping.php'); } //END ZWFS Contribution
  11. greasemonkey

    Database Optimizer

    Ok, thanks @@Jack_mcs, however, it's probably a little past my skills... It think its working now via the cronjob without any changes, it only seems to fail when run manually via the admin.
  12. greasemonkey

    Database Optimizer

    @@Jack_mcs, I was working on getting this working for my 2.3.3.2 and have it mostly converted to tep_db but have run into problems with the below code in database_optimizer_common.php (already change to tep_db_query). Please keep in mind - I'm not a coder. if ($config['optimize'] || $config['analyze']) { if (mysql_select_db(DB_DATABASE)) { // Select database and continue only if successful (have permission to) $tbl_status = 'SHOW TABLE STATUS FROM ' . DB_DATABASE; // Statement to select the tables in the currently looped database $tbl_result = tep_db_query($tbl_status); // Query mySQL for the results Let me know if you can provide and assistance... with the MySQL_select_db... Can I use tep_db_connect somehow?
  13. greasemonkey

    ULTIMATE Seo Urls 5 - by FWR Media

    @@jasondmc84 can u confirm the products in question are attached to a category? I'm not sure your setup... I presume you have categories.
  14. greasemonkey

    Contribution: Auto Backup Database

    Hey everyone, I've been playing around on my dev site trying to get another addon to work with 2.3.3.2 and ran into a couple problems restoring a backup. 1)I received the following error I notice line 166 is $create_table_result = mysql_fetch_array($create_table_query, MYSQL_NUM); And, I believe (I'm not a coder) this should be changed for 2.3.3.2 to $create_table_result = tep_db_fetch_array($create_table_query, MYSQL_NUM); I've changed in my dev site and tested and now works... 2)When restoring, leaving the defaulted "checked" It seems to be deleting these tables completely... Not emptying... When I leave the box "upchecked' I receive the following error Can anyone confirm???
  15. Hi @@FWR Media, I used this wonderful addon with great success when updating from 2.2 to 2.3.3. It help tremendously... Especially for a newbie like myself. I was wondering if you are going to update this addon for 2.3.3.2? I notice this function in includes/functions/database.php function tep_db_query($query, $link = 'db_link') { global $$link; if (defined('STORE_DB_TRANSACTIONS') && (STORE_DB_TRANSACTIONS == 'true')) { error_log('QUERY ' . $query . "\n", 3, STORE_PAGE_PARSE_TIME_LOG); } $start_time = microtime( true ); $result = mysql_query($query, $$link) or tep_db_error($query, mysql_errno(), mysql_error()); if ( class_exists( 'KissER' ) ) { KissER::q( round( ( microtime( true ) - $start_time ), 4 ), $query ); } if (defined('STORE_DB_TRANSACTIONS') && (STORE_DB_TRANSACTIONS == 'true')) { $result_error = mysql_error(); error_log('RESULT ' . $result . ' ' . $result_error . "\n", 3, STORE_PAGE_PARSE_TIME_LOG); } return $result; } got changed to mysqli in 2.3.3.2. Will your function still work (with everything else updated to 2.3.3.2), at least until php 5.4? Not a big deal for me... I have done most, for now, all my troubleshooting. And I'm sure there will be a bunch more addon's that will require updating (I'm sure us newbie will have to get used to it).
  16. greasemonkey

    canada.post.rest.rate.service.oscommerce.V2.3

    This should probably be moved to the Addons - Shipping forum... I will try and download in the next couple of weeks to see if I can make it work... I have an Canada Post automatic labels mod based on REST (that is very roughly written... but works). Maybe we can get both refined and working together...
  17. greasemonkey

    Moneris, eSelect plus

    I have this working in 2.3... No issue what so ever. What is your issue exactly? The instructions are clear (where to put and what to call each file is on page 5) in the .pdf... There is a guide on how to convert addons from 2.2 to 2.3 here http://forums.oscommerce.com/topic/368538-guide-to-converting-addons-from-22x-to-23x/... It takes about 1 min. to convert this addon (moneriscampg.php). If you are more clear with your problem I can try and help.
  18. greasemonkey

    Automatic Currency adjustment by continent

    working in my sandbox... thanks again!
  19. greasemonkey

    Automatic Currency adjustment by continent

    I'll give it a try later today. Thanks kindly!
  20. greasemonkey

    Automatic Currency adjustment by continent

    Shoot... Let me know if u need any assistance. I'm not a coder but could help test.
  21. greasemonkey

    Automatic Currency adjustment by continent

    Worked ... thank you kindly. Just testing now via US based proxy and they currency doesn't seem to be changing automatically to USD? I confirmed the IP is US via ip2location My default currency is CAD (in admin and includes/language/English.php). And USD is my only other currency (I don't use EUR). Any ideas?
  22. greasemonkey

    Automatic Currency adjustment by continent

    @@Gyakutsuki I finally got around to installing this in my sandbox site to test... However, I'm having an issue. I receive the following error when I set to true in my store config; Fatal error: Call to undefined function osc_count_files_directory_cache_geolocalisation() in /home/******/public_html/sandbox/includes/functions/geolocalisation.php on line 151 Any idea what I missed? I only installed the English sql as my store is only... I see IP files in the cache... so its working (I think... I will check with a proxy after I fix this issue)...
  23. Yes, presuming you have a made tax zone in your admin (locations / taxes) called "48 states" - in your admin set the shipping zone for the module as you would for any other shipping module. Don't know... never used this mod... I use ZWFS... Test it and find out...
  24. Yes... Copy (DON'T FORGET TO BACKUP!) includes/modules/shipping/flat.php and includes/languages/english/modules/shipping/flat.php And rename to includes/modules/shipping/free.php and includes/languages/english/modules/shipping/free.php. Then, once you create your 2 new "free.php" files you will have to open them both and replace text "flat" and "FLAT" (case sensitive) with "free" & "FREE" (no ""... also make sure not to add any spaces before or after the text)... Use find and replace feature of notepad++ with the "case match" box checked. Then in includes/modules/shipping/free.php (the new module you just created) add; // don't forget to change < 300 to the value you wish for free shipping// if( function_exists('tep_customer_greeting') && $order->info['subtotal'] < 300 ) $this->enabled = false; } AFTER if ($check_flag == false) { $this->enabled = false; } } If you then disable your free shipping order total module you should see all shipping rates and, if you install this module (if using 2.3 in the admin under shipping modules), once the free shipping threshold you set is reach it should then also display. Your customer can then choose to use UPS if they wish. Added xxample; I have the text in my includes/languages/english/modules/shipping/free.php changed to; define('MODULE_SHIPPING_FREE_TEXT_WAY', 'Ground shipping (3 to 10 days).'); I have found this dramatically reduces the number of free shipping orders by encouraging them to choose UPS and pay for the shipping to receive faster delivery.
  25. Did you complete this step (assuming you are using 2.3 don't forget to install the module via the admin)? Maybe I should have been more clear in my brief instructions :) - once you create your 2 new "free.php" files you will have to open them both and replace flat and FLAT (case sensitive) with free & FREE. Example function flat() { global $order; $this->code = 'flat'; $this->title = MODULE_SHIPPING_FLAT_TEXT_TITLE; Becomes function free() { global $order; $this->code = 'free'; $this->title = MODULE_SHIPPING_FREE_TEXT_TITLE; If so, disable the free shipping order total module (it won't be used at all)... Tell me what you see... Do you get shipping quotes?
×