Jump to content
Latest News: (loading..)

PiLLaO

Members
  • Content count

    318
  • Joined

  • Last visited

  • Days Won

    4

PiLLaO last won the day on January 21

PiLLaO had the most liked content!

1 Follower

Profile Information

  • Real Name
    Gustavo
  • Gender
    Male
  • Location
    Spain

Recent Profile Visitors

17,102 profile views
  1. Not good for SEO, you must to put the products only in one category
  2. This addon don't send email, only show the carts
  3. In Spain GDPR not allow to send emails if customers don't consent before
  4. PiLLaO

    Limit or surcharge for shipping module

    You forget $ here: if (post_sur == $order->delivery['postcode']) { And if you use more than 1 postcode to compare, you need a for loop
  5. PiLLaO

    Time for create account

    Try this: https://www.w3schools.com/sql/func_mysql_time.asp Find in Google
  6. Both functions give me the same results, and the frontend function don't make the same sql consult all the time.
  7. Hello, I look that the function tep_get_tax_rate() catalog/includes/functions/general.php //// // Returns the tax rate for a zone / class // TABLES: tax_rates, zones_to_geo_zones function tep_get_tax_rate($class_id, $country_id = -1, $zone_id = -1) { global $customer_zone_id, $customer_country_id; static $tax_rates = array(); if ( ($country_id == -1) && ($zone_id == -1) ) { if (!tep_session_is_registered('customer_id')) { $country_id = STORE_COUNTRY; $zone_id = STORE_ZONE; } else { $country_id = $customer_country_id; $zone_id = $customer_zone_id; } } if (!isset($tax_rates[$class_id][$country_id][$zone_id]['rate'])) { $tax_query = tep_db_query("select sum(tax_rate) as tax_rate from " . TABLE_TAX_RATES . " tr left join " . TABLE_ZONES_TO_GEO_ZONES . " za on (tr.tax_zone_id = za.geo_zone_id) left join " . TABLE_GEO_ZONES . " tz on (tz.geo_zone_id = tr.tax_zone_id) where (za.zone_country_id is null or za.zone_country_id = '0' or za.zone_country_id = '" . (int)$country_id . "') and (za.zone_id is null or za.zone_id = '0' or za.zone_id = '" . (int)$zone_id . "') and tr.tax_class_id = '" . (int)$class_id . "' group by tr.tax_priority"); if (tep_db_num_rows($tax_query)) { $tax_multiplier = 1.0; while ($tax = tep_db_fetch_array($tax_query)) { $tax_multiplier *= 1.0 + ($tax['tax_rate'] / 100); } $tax_rates[$class_id][$country_id][$zone_id]['rate'] = ($tax_multiplier - 1.0) * 100; } else { $tax_rates[$class_id][$country_id][$zone_id]['rate'] = 0; } } return $tax_rates[$class_id][$country_id][$zone_id]['rate']; } are diferent of the function in catalog/admin/includes/functions/general.php //// // Returns the tax rate for a zone / class // TABLES: tax_rates, zones_to_geo_zones function tep_get_tax_rate($class_id, $country_id = -1, $zone_id = -1) { global $customer_zone_id, $customer_country_id; if ( ($country_id == -1) && ($zone_id == -1) ) { if (!tep_session_is_registered('customer_id')) { $country_id = STORE_COUNTRY; $zone_id = STORE_ZONE; } else { $country_id = $customer_country_id; $zone_id = $customer_zone_id; } } $tax_query = tep_db_query("select SUM(tax_rate) as tax_rate from " . TABLE_TAX_RATES . " tr left join " . TABLE_ZONES_TO_GEO_ZONES . " za ON tr.tax_zone_id = za.geo_zone_id left join " . TABLE_GEO_ZONES . " tz ON tz.geo_zone_id = tr.tax_zone_id WHERE (za.zone_country_id IS NULL OR za.zone_country_id = '0' OR za.zone_country_id = '" . (int)$country_id . "') AND (za.zone_id IS NULL OR za.zone_id = '0' OR za.zone_id = '" . (int)$zone_id . "') AND tr.tax_class_id = '" . (int)$class_id . "' GROUP BY tr.tax_priority"); if (tep_db_num_rows($tax_query)) { $tax_multiplier = 0; while ($tax = tep_db_fetch_array($tax_query)) { $tax_multiplier += $tax['tax_rate']; } return $tax_multiplier; } else { return 0; } } The function in catalog/includes/functions/general.php reduce querys to a minimal, so... if safe to replace this function with the function in catalog/admin/includes/functions/general.php ? Best regards
  8. PiLLaO

    ULTIMATE Seo Urls 5 - by FWR Media

    Better replace this: require('includes/application_top.php'); if (http_response_code() == 404) { require('your_custom_404.php'); return false; } With this: require('includes/application_top.php'); if (http_response_code() == 404) { require('your_custom_404.php'); exit; } Best regards :)
  9. And how many sql queries use to load the website? https://apps.oscommerce.com/TbX2f&kisser-error-handling-debugging
  10. PiLLaO

    ULTIMATE Seo Urls 5 - by FWR Media

    In catalog/includes/modules/ultimate_seo_urls5/main/validator.php, if you find this private function validate() { // Get the incoming seo uri minus the session id Usu_Main::i()->setVar( 'request_compare_in', remove_session_id( htmlspecialchars_decode( Usu_Main::i()->getVar( 'original_request_uri' ) ) ) ); // Get a brand new url based on the querystring $new_url = htmlspecialchars_decode( tep_href_link( Usu_Main::i()->getVar( 'filename' ), Usu_Main::i()->getVar( 'request_querystring' ) ) ); // Strip the new url of domain name and session id to arrive at a comparible uri Usu_Main::i()->setVar( 'request_compare_new', remove_session_id( str_replace( array( HTTPS_SERVER, HTTP_SERVER ), '', $new_url ) ) ); /** * If $page_not_found has been set to bool true then the page module returned a result of bool false from the database * this means that the product/category etc does not exist so we need to show 404 headers and page. */ if ( false !== Usu_Main::i()->getVar( 'page_not_found' ) ) { $this->pageNotFound(); } // If the incoming uri and the newly created uri do not match then we need to 301 redirect to the new. if ( Usu_Main::i()->getVar( 'request_compare_in' ) != Usu_Main::i()->getVar( 'request_compare_new' ) ) { $this->redirect( $new_url ); } } // end method And change by this private function validate() { // Get the incoming seo uri minus the session id Usu_Main::i()->setVar( 'request_compare_in', remove_session_id( htmlspecialchars_decode( Usu_Main::i()->getVar( 'original_request_uri' ) ) ) ); // Get a brand new url based on the querystring $new_url = htmlspecialchars_decode( tep_href_link( Usu_Main::i()->getVar( 'filename' ), Usu_Main::i()->getVar( 'request_querystring' ) ) ); // Strip the new url of domain name and session id to arrive at a comparible uri Usu_Main::i()->setVar( 'request_compare_new', remove_session_id( str_replace( array( HTTPS_SERVER, HTTP_SERVER ), '', $new_url ) ) ); /** * If $page_not_found has been set to bool true then the page module returned a result of bool false from the database * this means that the product/category etc does not exist so we need to show 404 headers and page. */ if ( false !== Usu_Main::i()->getVar( 'page_not_found' ) ) { header( "HTTP/1.0 404 Not Found" ); return false; // $this->pageNotFound(); } // If the incoming uri and the newly created uri do not match then we need to 301 redirect to the new. if ( Usu_Main::i()->getVar( 'request_compare_in' ) != Usu_Main::i()->getVar( 'request_compare_new' ) ) { $this->redirect( $new_url ); } } // end method You get the catalog/index.php?cPath=1958 and catalog/product_info.php?products_id=2800 with de standart text of "product/category not found" and a 404 error. Now in product_info.php just after require('application_top') look if you have an 404 error and require your custom 404 page, your_custom_404.php must have require('includes/application_top.php'); commented require('includes/application_top.php'); if (http_response_code() == 404) { require('your_custom_404.php'); return false; } I must to check if on index will work this too. Bests regards
  11. PiLLaO

    ULTIMATE Seo Urls 5 - by FWR Media

    For example, Don't exists and Custom Error Server Pages shows a 404 Not found, in this case USU5 not take part. But, if you try with a non real category or product These urls really are: These files exists on server and in these cases USU5 take part, so the Custom Error Server Pages don't show a 404 because file exists. USU5 try to find these products or categories and can't find them so uses a php header to put the 404 error and call a file on server, at this time catalog/application_top.php, catalog/template_top.php, catalog/template_bottom.php and catalog/application_bottom.php are loaded and any custom 404 page that I try to use get error because you are load before application_top.php and other. USU5 uses a 404 page that not have the same look that oscommerce <?php /** * * ULTIMATE Seo Urls 5 PRO ( version 1.1 ) * * * @package USU5_PRO * @license http://www.opensource.org/licenses/gpl-2.0.php GNU Public License * @link http://www.fwrmedia.co.uk * @copyright Copyright 2008-2009 FWR Media * @copyright Portions Copyright 2005 ( rewrite uri concept ) Bobby Easland * @author Robert Fisher, FWR Media, http://www.fwrmedia.co.uk * @lastdev $Author:: Rob $: Author of last commit * @lastmod $Date:: 2010-12-21 22:45:02 +0000 (Tue, 21 Dec 2010) $: Date of last commit * @version $Rev:: 196 $: Revision of last commit * @Id $Id:: notfound_404.php 196 2010-12-21 22:45:02Z Rob $: Full Details */ /** * Page not found html with 404 header * @package USU5_PRO * * @var array $text - array of text strings to be used in the html */ $text = array( 'title' => 'Page not found', 'text' => 'The page you were looking for could not be found. Please click the below link to return to ' . STORE_NAME . ' <p><a href="' . tep_href_link( FILENAME_DEFAULT ) . '" title="' . STORE_NAME . '">' . STORE_NAME . '</a></p><br />' ); header( "HTTP/1.0 404 Not Found" ); ?> <title>Page Not Found</title> <div style="padding: 3em; font-family: verdana; margin: 3em; border: 1px solid #e5e5e5;"> <div style="background-color: #2E8FCA; font-size: 12pt; font-weight: bold; padding: 0.5em; color: #00598E;"> <div style="float: right; color: #0073BA; font-weight: bold; font-size: 16pt; margin-top: -0.2em;">FWR MEDIA</div><?php echo $text['title']; ?></div> <div style="padding: 0.5em; font-size: 9pt; font-family: verdana;"><?php echo $text['text']; ?></div></div> </div> And in this file tep_href_link and STORE_NAME works because catalog/application_top.php are previous loaded. Sorry for my poor english, I hope I can explain correctly.
  12. PiLLaO

    ULTIMATE Seo Urls 5 - by FWR Media

    Thanks you so much, but I tried this in this morning, Get the same look that oscommerce not possible, I must to copy the html and If I make any change, the 404 will be obsolete
  13. PiLLaO

    ULTIMATE Seo Urls 5 - by FWR Media

    With Ultime Seo Urls be FWR, products and categories not found have the same issue, the server_error.php needs to reload application_top, template_top, etc... and get error. Another urls that not found, works correctly
  14. PiLLaO

    ULTIMATE Seo Urls 5 - by FWR Media

    Hola Rainer, I tried to make it, but I can't show header, footer and categories box...
×