Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation since 06/10/2019 in all areas

  1. 5 points
    burt

    Sitewide Hooks

    That's the general idea. Especially with the latest change to these sitewide hooks, now it's possible to just upload the hook and it gets injected in the page without a need to call it That's BIG!
  2. 2 points
    burt

    Sitewide Hooks

    Perfect! A hole in one.
  3. 1 point
    JcM Adverts Header V1.0 CE BS3/4 A simple add-on that allows you to display adverts in a carousel in the header It’s a simple no core change add-on so just copy files over go to admin and install and setup. It is setup to allow 3 slides for display. These can be images or videos or any combination.
  4. 1 point
    supercheaphobb

    how to manage heaps of images

    Many thanks @JcMagpie just copied yours and added my small changes back in to the file - all working
  5. 1 point
    JcMagpie

    how to manage heaps of images

    😊 Try this will do all images. Have as many subdir.. as you like , I based on this add-on. Working fine on CE Edge. file attached as allways backup first. http://forums.oscommerce.com/index.php?showtopic=347582 categories.php
  6. 1 point
    burt

    Sitewide Hooks

    SiteWide Hooks (Frozen).zip These add in the possibility to easily track what versions you are using for external scripts (eg jquery, bootstrap etc). This is coming this month in Edge. If you want to try it on Frozen, download the zip and; make the changes in /includes/template_top.php make the changes in /includes/template_bottom.php upload the contents of /includes/hooks/ Open to constructive feedback and discussion.
  7. 1 point
    puddlec

    Sitewide Hooks

    came up with an idea, a page that checks you are running the latest version of a script e.g. lets say you got jquery 3.3.1 installed via the hook, it will compare what it says in the hook, to what is currently available. and tells you if you are up to date, or if you need to update that script e.g. cdnjs have got an api which returns results in json format - which i was able to do a very basic check against - but it is not going to be prefect, as they have only got up to font awesome 5.8.2 and not 5.9.0 as that would be easier looking at one place than having to look at multiple different places
  8. 1 point
    greasemonkey

    Auto set currency based on ip

    Alex, I modified and used this for years... 3 important points... Keep in mind - I'm not a coder... and have enough knowledge to be dangerous (I only reply because I have years of experience with this addon that should be taken into consideration that mostly has nothing to do with the code) 1) as @Jack_mcs pointed out the API is (I believe) is gone and wasn't very reliable when it was there which caused serious issues. I modified it to work with the Cloudflare which has a reliable IP country feature. If you happen to delivery your site on CF.... just replace the function with: $location = $_SERVER["HTTP_CF_IPCOUNTRY"]; 2) there is some missing logic (fail safe) - if the function (or cloudflare) doesn't return the country.... that causes the price (ALL prices) on whichever country to be 0.00. Easy to fix up if you have only 2 currencies as I do... more difficult if you are thinking more than 2. 3) MOST IMPORTANT... there are some serious SEO considerations which I tried to work around for years. Although Google has crawlers all over the world, predominately, they crawl with USA based bots in North America (think Canada and Mexico) - and if you deliver your content dynamically to the USA you will be crawled as the bots see it... as USA. This includes currency. If you are not in the USA this will cause (did for me) your structured meta tag for all google listings to display in US currency no matter where your customers are located (example: we are in Canada and all our Google search results in Canada displayed in USD while using this addon). Long story short, Google does NOT like dynamic pricing based on IP. I recently kill this addon and replaced it with a modal that delivers only to USA customers, asking if they would like to shop in USD. After this change my Google listings, within days, started to be re-crawled and displayed in my "home/default" currency. There were some other suprising results as well... example: bounce rate for USA customers dropped like a stone.... (with @burt permission I will share my modal... as it was his modal for another addon I used.... but you still need a API call that will work - again I used cloudflare)
  9. 1 point
    ArtcoInc

    I have no "main_page.tpl.php" file

    @alex121121 I downloaded the add-on in question to take a look at it. While it *may* have worked way back when, I don't think it will do what you want it to do now, especially with the current Community Edition of osC. Sorry 😕 M
  10. 1 point
    Hotclutch

    I have no "main_page.tpl.php" file

    I see the addon was submitted under Ver 2.2, not sure if that was a mistake, but Neither Bootstrap nor official osC has a file called main_page.tpl.php Also note that the bootstrap version removes these kind of definitions: <?php require(DIR_WS_INCLUDES . 'cur_update.php'); ?> So you should use instead: <?php require('includes/cur_update.php'); ?>
  11. 1 point
    raiwa

    Auto set currency based on ip

    Language ids include country specific part, see your browser preferences. And in the english language file see at the very beginning: // look in your $PATH_LOCALE/locale directory for available locales // or type locale -a on the server. // Array examples which should work on all servers: // 'en_US.UTF-8', 'en_US.UTF8', 'enu_usa' // 'en_GB.UTF-8', 'en_GB.UTF8', 'eng_gb' // 'en_AU.UTF-8', 'en_AU.UTF8', 'ena_au' @setlocale(LC_ALL, array('en_US.UTF-8', 'en_US.UTF8', 'enu_usa'));
  12. 1 point
    alex121121

    Auto set currency based on ip

    That is awesome. All problems are solved then. Thank you guys.
  13. 1 point
    raiwa

    Auto set currency based on ip

    Language is auto selected by browser language settings. EDIT: Nothing illegal, each browser and WEB Site uses this. Just check your browser settings and visit multilanguage sites. Each site which supports your preferred browser language will show the site in that language.
  14. 1 point
    raiwa

    Auto set currency based on ip

    What is very easy to do is to link the currency to the language. In admin: Configuration: My Store: Switch To Default Language Currency set to true Then in each main language file, set the desired currency in aprox. line 39-40: // if USE_DEFAULT_LANGUAGE_CURRENCY is true, use the following currency, instead of the applications default currency (used when changing language) define('LANGUAGE_CURRENCY', 'USD');
  15. 1 point
    burt

    Auto set currency based on ip

    Would be 100% illegal per GDPR, by my understanding. You can't use the users IP "for stuff" unless you get the users permission.
  16. 1 point
    Jack_mcs

    Auto set currency based on ip

    @alex121121The addon mentioned by @raiwawas meant for the purpose you want. However, it uses a third-party site to check the IP and if you go to that site (mentioned on the addon page), you will see it says closed. The site may still work but IP's won' be updated, from the looks of it. Also, if it does work, there is a limit in the code that only allows a certain number of checks for a certain period. That won't matter on slow sites but will on busier ones. There was also a problem with that other site, as I recall, that if it was busy or not responding, the calling site would set and wait. Any benefit of showing the currency would be lost if a customer has to wait. And one final point, IP's are not country-specific so the addon might report the wrong country. This is especially true in Europe where the countries are so close together.
  17. 1 point
    raiwa

    Auto set currency based on ip

    Hello @alex121121, If you search the marketplace for your title you'll get several promising results. The best in my opinion: Auto change currency based on IP address It may need some minor updates, but I believe it shouldn't be too difficult.
  18. 1 point
    altoid

    Sitewide Hooks

    @burt I think I understand this now. For me, I can look up the versions as noted. I modified the language file a bit to help remind me whenever down the road where to start when doing a version change...
  19. 1 point
    @douglaswalker sorry Doug didn't think properly - you need to change the query string rather than the url RewriteCond %{QUERY_STRING} "^([^\s%20]*)(?:\s|%20)+(.*)$" RewriteRule ^ %{REQUEST_URI}?%1%2 [L,R]
  20. 1 point
    JcMagpie

    Sitewide Hooks

    I very much doubt this as it does nothing to let the ordinary user know if he or she is using gold, edge, or frozen. Also very complicated way of doing somthing as simple as letting people know what they have just installed. All this can be done by having a simple file in the install zip which holds all the info and displays it in admin. Simple file which any user can edit and keep updated if they ever make changes. For those that download frozen with BS4 from the test site they will have this (see below) in version checker. So will know eactly what they have just installed, but then maybe I'm taking a too simplistic view of this!
  21. 1 point
    😊 Here it is, https://apps.oscommerce.com/TEHRr&amp;specials-ribbon-v2-3-4-1-ce In apps market just click on any of my add-on's and then by the Updated by click the name and you will see my profile which lists them all. https://apps.oscommerce.com/Profile&amp;152272-jcmagpie
  22. 1 point
    Can you show us the full .htaccess file on both sites, and which directory they're in? ***-out any sensitive information. You don't have anything on your new site redirecting back to the old site, do you? Your description of what is happening is very confusing. Is this happening on the old site or the new site? If it's on the new site, it should have nothing to do with the redirection from the old site. Are both sites on Apache servers, or did you change server types?
  23. 1 point
    so how did you put it down in htaccess that it throws the error ? I think it could be like this, but not 100% sure: RewriteEngine On RewriteBase /catalog/ RewriteRule ^(.*)-p-(.*).html$ product_info.php?products_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-c-(.*).html$ index.php?cPath=$2&%{QUERY_STRING} RewriteRule ^(.*)-m-([0-9]+).html$ index.php?manufacturers_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-pi-([0-9]+).html$ popup_image.php?pID=$2&%{QUERY_STRING} RewriteRule ^(.*)-t-([0-9]+).html$ articles.php?tPath=$2&%{QUERY_STRING} RewriteRule ^(.*)-a-([0-9]+).html$ article_info.php?articles_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-pr-([0-9]+).html$ product_reviews.php?products_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-pri-([0-9]+).html$ product_reviews_info.php?products_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-i-([0-9]+).html$ information.php?info_id=$2&%{QUERY_STRING} RewriteRule !^catalog/admin($|/) https://www.newdomain.com%{REQUEST_URI} [L,R=301] Rewrite ^(.*)$ https://www.newdomain.com/$1 [R=301,L]
  24. 1 point
    Hotclutch

    2nd Product Image replaces main image

    Here is the demo of last official osC: https://demo.oscommerce.com/product_info.php?products_id=28 You already have a small image gallery. The bootstrap code is the same as the last official osC in this respect.
  25. 1 point
    MrPhil

    Forum Changes

    Harald, I have said it before, and I'll say it again: You cannot leave a product unattended for more than 12 months, or the ecommerce market declares it dead. You must have a major refresh or release at least annually, to stay in the public mind as a "current" product. The official product (currently 2.3.4.1) is the one that "one button" installers will pick up. That's the one that all newcomers will be using. It must be kept current. It doesn't matter if @burt's dazzling BS4 responsive PHP 7.3-ready plutonium-powered incredible edible edition is "available" on the main page -- that's not the one installers will pick. It would be best to take Frozen + patches and rebrand it as osC 2.5 (since 2.4 is already taken), and make it the official release. At least that will buy some time for a newer edition to be developed. If your work isn't ready by early 2020, Gary's BS4 edition could be 2.5.1, buying another year's grace. It's a very bad habit to not keep the current release updated, on the expectation that your work will be ready (Gold) Any Day Now -- history has shown that never happens, and these things slip for years. It doesn't matter how wonderful whatever you're working on will be -- it may well be the greatest thing since sliced bread, but if it's been more than a year since the last update, it will be starting from scratch in the public marketplace. In fact, it's worse than that -- it will have to first dig itself out of the "osCommerce is dead, dead, dead" hole before it's even in the race. Please declare everything earlier than (official) 2.3.4.1 to be immediate End of Life, and bar any further support discussion, except for how to migrate to the current version. 2.3.4.1 and Gary's CE works should go EOL in a year or so. Let's clear the decks of all the ancient stuff, and get everyone to the new 2.5 (a.k.a. Frozen) and eventually to whatever you release. Yes, tools are needed to make migrations less painful. If this feels like a bucket of ice water poured over your head, it's meant to be. Time to wake up!
×