Jump to content

DAVID3733

♥Ambassador
  • Content count

    296
  • Joined

  • Last visited

Everything posted by DAVID3733

  1. Hi A friend of mine is playing with a module he purchased on Presta shop, to add to cart via WhatsApp, it creates a order on the server etc and then they can phone in to pay etc. separate button to chat via whatsapp Not seen anything available for eCommerce yet, has anyone created something similar as a module, paid or otherwise. David
  2. DAVID3733

    PayPal Express and Free Shipping issue. Bug?

    Can confirm this worked for me Thank you for sharing
  3. DAVID3733

    ULTIMATE Seo Urls 5 - by FWR Media

    Hi Yes I thought it would be easy, unfortunately I am not a coder, not even close looking at the page it appears to be able to get the EN and FR URL, this is so it can get the alternate lang for the HrefLang But if I understand the X-Default correct requirement right, in my case I want to tell Google that my fallback language is English Although I am unable to read the code properly on the code I would imagine the Lang Variable on the page is indeed for the Language its on then swaps over to the other Lang for both languages so it probably could not slip straight into the existing variable I am sure this could be hardcoded something like <link rel="alternate" href="https://www. websitepage_I_am_on_now.com(English)/" hreflang="x-default" /> as it only needs to be one language, the fall back one, But like I say no coder so do not know how to move forward
  4. DAVID3733

    ULTIMATE Seo Urls 5 - by FWR Media

    If you can tell me how to add it to the previous version below I can let you know in a few weeks if it works and gets listed for Goggle as I have thousands of pages listed as alternatives, en and FR already in google and have for at least a year, just not X-default🙂 <?php class FWR_hreflang { protected $page; protected $mode; protected $get; protected $lng; protected $language; protected $root_path; protected $language_image_width = '24'; protected $language_image_height = '15'; protected $session_started; protected $language_code_array = array(); protected $links_icons; protected $links_list; protected $alternate_hreflang; protected $lang_array; public function __construct( navigationHistory $navigation, $language, $lng = false, $session_started = false ) { require(DIR_FS_CATALOG . 'includes/languages/' . $language . '/hreflang.php'); $navigation_data = array_pop( $navigation->path ); $this->page = $navigation_data['page']; $this->mode = $navigation_data['mode']; $this->get = $navigation_data['get']; $this->setLanguage( $lng ); $this->language = $language; $this->root_path = realpath( dirname( __FILE__ ) . '/../../' ) . '/'; $this->session_started = $session_started; $this->getLanguageSelectionHtml(); } // Returns an unordered list of links to the public function __toString() { return $this->links_icons; } // Returns an array containing data of all alternate languages (other than current language) public function lang_array() { return $this->lang_array; } // Returns an array containing data of all alternate languages (other than current language) public function links_list() { return $this->links_list; } public function hreflang_tags() { // Returns a string containing all the hreflang tags pertinent to this page (other than current language) return $this->alternate_hreflang; } protected function setLanguage( $lng ) { if ( ( false === $lng ) || ( !$lng instanceof language ) ) { include_once 'includes/classes/language.php'; $this->lng = new language(); $this->setLanguageArray(); return $this->lng; } $this->lng = $lng; $this->setLanguageArray(); } protected function setLanguageArray() { foreach ( $this->lng->catalog_languages as $code => $unused ) { $this->language_code_array[] = $code; } } protected function getLanguageSelectionHtml() { global $languages_id,$language; $alternate = $links_icons = $links_list = ""; $output = '<ul style="list-style-type:none; padding:0; margin:0;">'; foreach ( $this->lng->catalog_languages as $code => $data ) { // Sets USU language to the current selection Usu_Main::i()->initiate( array(), $data['id'], $data['directory'], true ); $language_image_path = 'includes/languages/' . $data['directory'] . '/images/icon.gif'; $this_link = $this->buildLink( $default = ( $code === DEFAULT_LANGUAGE ), $code ); $hr [$data['id']]['id']=$data['id']; $hr [$data['id']]['name']=$data['name']; $hr [$data['id']]['image']=$data['image']; $hr [$data['id']]['directory']=$data['directory']; $hr [$data['id']]['href']=$this_link ; $alternate .= '<link rel="alternate" hreflang="' . $code . '" href="' . $this_link . '" />' . PHP_EOL; if ( $data['directory'] != $this->language ) { $links_icons .= ' <a href="' . $this_link . '">' . tep_image($language_image_path, $data['name'], NULL, NULL, NULL, false) . '</a>'; $links_list .= '<a class="dropdown-item" href="' . $this_link . '">' . tep_image($language_image_path, $data['name'], NULL, NULL, NULL, false) . '&nbsp;' . LANGUAGES_CHANGE_TO . "&nbsp;" . $data['name'] . '</a>' . PHP_EOL; } } $this->links_list = $links_list; $this->links_icons = $links_icons; $this->alternate_hreflang = $alternate; $this->lang_array =$hr; // Resets USU language to the current language for the rest of the links on the page Usu_Main::i()->initiate( array(), $languages_id, $language, true ); } protected function buildLink($default = false, $code ) { if ( false === $this->session_started ) { // return $this->multiLanguage( tep_href_link( 'index.php', '', 'NONSSL' ), $default, $code ); } $curlink = tep_href_link ($this->page, $this->getQuery(), $this->mode, true, false, $code); return $this->multiLanguage( $curlink , $default, $code ); } protected function getQuery() { if ( tep_not_null( $this->get ) ) { if ( array_key_exists( tep_session_name(), $this->get ) ) { unset( $this->get[tep_session_name()] ); } return http_build_query( $this->get ); } return ''; } protected function removeQueryString( $target ) { if ( false === strpos( $target, '?' ) ) { return $target; } return substr( $target, 0, strpos( $target, '?' ) ); } protected function removeLanguageMarkers( $target, $cookie_path ) { $return = preg_replace( '@' . $cookie_path . '(' . implode( '|', $this->language_code_array ) . ')/@', $cookie_path, $target ); $return = preg_replace( '@' . $this->page . '/(' . implode( '|', $this->language_code_array ) . ')@', $this->page, $return ); return $return; } protected function multiLanguage( $link, $default, $code ) { $server = ( $this->mode == 'NONSSL' ) ? HTTP_SERVER : HTTPS_SERVER; $cookie_path = ( $this->mode == 'NONSSL' ) ? HTTP_COOKIE_PATH : HTTPS_COOKIE_PATH; $server = $server . $cookie_path; $link = $this->removeLanguageMarkers( $link, $cookie_path ); if ( false !== $default ) { $no_querystring = $this->removeQueryString( $link ); // Is the page FILENAME_DEFAULT and after the querystring is removed is FILENAME_DEFAULT the ending characters of the URL, if so we chop it off leaving just the domain if ( ( $this->page == 'index.php' ) && ( substr( $no_querystring, ( strlen( $no_querystring ) - strlen( $this->page ) ), strlen( $no_querystring ) ) == $this->page ) ) { return str_replace( $this->page, '', $link ); } return $link; } // If the .php filename is present in the link if ( false !== strpos( $link, $this->page ) ) { return str_replace( $this-> page, $this->page . '/' . $code, $link ); } return str_replace( $server, $server . $code . '/', $link ); } }
  5. DAVID3733

    ULTIMATE Seo Urls 5 - by FWR Media

    Hi piernas Glad you are still improving and updating this addon, for people like me who have very old URLS and do not want to lose the history of the links its very important. Has X-default in the Hreflang alternate language been addressed yet If I have understood it correct its just the fallback language of the page, for example my site is in english, most of the world is in english, I have a a alternate lang in FR there should also be a x-default alternate on all pages including the FR ones to the English should be a easy thing to have as all the data is on the page in USU5, just wish I knew how to do it. somewhere around here $alternate .= '<link rel="alternate" hreflang="' . $code . '" href="' . $this_link . '" />' . PHP_EOL; if ( $data['directory'] != $this->language ) { $links_icons .= ' <a href="' . $this_link . '">' . tep_image($language_image_path, $data['name'], NULL, NULL, NULL, false) . '</a>'; $links_list .= '<a class="dropdown-item" href="' . $this_link . '">' . tep_image($language_image_path, $data['name'], NULL, NULL, NULL, false) . '&nbsp;' . LANGUAGES_CHANGE_TO . "&nbsp;" . $data['name'] . '</a>' . PHP_EOL; } } David
  6. DAVID3733

    Google reCAPTCHA v3

    I have installed this on 2.3.4bs quite close to phoenix, easy install, can see the Google box so assume its all working on contact and create account Would think a good addition would be product pages as well, assume it would help with bots scraping, has anyone done this? Regards David
  7. DAVID3733

    Automatically send data feed to Froogle

    Not sure what base version of the module I am using but i have somethng like thats on 2.3.4bs4 php 7.216 chdir('../'); include_once 'includes/application_top.php'; $use_mysqli = true; if (function_exists('tep_get_version')) { $ver = tep_get_version(); if (isset($ver[4]) && $ver[4] > 1) { //only versions after 2.3.1 use mysqli $use_mysqli = true; } } $myfetch_mysql = ($use_mysqli ? mysqli_fetch_object : mysql_fetch_object);
  8. DAVID3733

    Ultimate Seo Urls 5 Pro

    I take that back, it cause other issues, if i ever find the right method i will post back
  9. DAVID3733

    Ultimate Seo Urls 5 Pro

    Can confirm with a bit of jiggling it will work in httpd.conf had to change RewriteRule ^([a-z0-9/-]+)-c-([0-9_]+)\.html$ index.php? [NC,L,QSA] to RewriteRule ^([a-z0-9/-]+)-c-([0-9_]+)\.html$ /index.php?cPath=$2 [NC,L,QSA] although have problem with popup image not working now, not sure if that related though to URLS5
  10. DAVID3733

    Ultimate Seo Urls 5 Pro

    Fully aware of this, I have a number of reasons, mainly because of speed and its my server main htaccess file takes me longer to upload than restarting Apache, both knock the website out so not a consideration
  11. DAVID3733

    Ultimate Seo Urls 5 Pro

    Hello Does anybody have URLS 5 Pro working (rewrite) using httpd.conf rather than .htaccess, I want to move over to zero .htaccess files but think this is stopping me Thank you David
  12. DAVID3733

    ULTIMATE Seo Urls 5 - by FWR Media

    If it helps anyone I got it workings $parameters = '?view=all'; $detail = array(); usu5_xml_init( $doc, $root); $categories = buildCategoriesCache(); foreach ( $categories as $cid => $detail ) { if( preg_match( '@[0-9_]@', $detail['path'] ) ) { $detail = array( 'url' => (tep_href_link( 'index.php', 'cPath=' . $detail['path'], 'NONSSL', false ) . $parameters), 'lastmod' => date( "Y-m-d", strtotime($detail['last_mod'] ) ), 'freq' => 'weekly', 'priority' => '0.5' ); usu5_node_create( $doc, $root, $detail ); Regards
  13. DAVID3733

    ULTIMATE Seo Urls 5 - by FWR Media

    Hi I use the xml site map function as well, it produes two languages and all works as should But I canonical all of my categories to ?Viewall I am struling getting the sitemap to list this I thought it would be easy enough, in usu5_itemaps/index.php I edited the following to something like foreach ( $categories as $cid => $detail ) { if( preg_match( '@[0-9_]@', $detail['path'] ) ) { //took out $detail = array( 'url' => tep_href_link( 'index.php', 'cPath=' . $detail['path'], 'NONSSL', false ), //and added ."?viewall" $detail = array( 'url' => tep_href_link( 'index.php', 'cPath=' . $detail['path']."?viewall", 'NONSSL', false ), 'lastmod' => date( "Y-m-d", strtotime($detail['last_mod'] ) ), 'freq' => 'weekly', 'priority' => '0.5' ); usu5_node_create( $doc, $root, $detail ); } } while this does not break it list the URL as a cPath (plus the correct appended ?viewall ) and not the seo version it should Tried loads of different ways, could someone point me in the correct path to resolving it, suspect its very simple just Thank you David
  14. DAVID3733

    Automatically send data feed to Froogle

    Hi no a coder, in UK 20% vat standard rate i have at different parts of the page define('OPTIONS_ENABLED_INCLUDE_TAX', 2); //0 = no tax, 1 = uses google method, 2 = UK Vat ....................................... define('OPTIONS_TAX_RATE' , '20.0'); //default = 0 (e.g. for 20.0% tax use "$taxRate = 20.0;") //only used in the next line define('OPTIONS_TAX_CALC', (OPTIONS_ENABLED_INCLUDE_TAX == 2 ? (OPTIONS_TAX_RATE/100) + 1 : '1')); //UK. US tax rate - US is ignorded since it is 1 .................... if(OPTIONS_ENABLED_INCLUDE_TAX == 1 || OPTIONS_ENABLED_INCLUDE_TAX == 3) $output .= "\ttax"; ...................................... if (OPTIONS_ENABLED_INCLUDE_TAX == 3) { $db_query = tep_db_query("select tax_rate from " . TABLE_TAX_RATES . " where tax_rates_id = " . (int)$row->tax_id); $db = tep_db_fetch_array($db_query); if ($db['tax_rate'] > 0) { $price_w_tax = $row->price_no_tax + (round($row->price_no_tax * ($db['tax_rate']/100),2)); //echo 'price '.$row->id. ' W TAX= ' . $row->price . ' No Tax= '.$row->price_no_tax .' CALC= '. $price_w_tax . ' ' .$row->tax_id.'<br>'; $row->price = $price_w_tax; } //else price uses the default tax } //else price uses the default tax ............................ if(OPTIONS_ENABLED_INCLUDE_TAX == 1) $output .= "\t" . OPTIONS_TAX_STRING; Not sure if i have edited this myself of found it in the forums, but it works I have some items that are zero vat rated, so it may be different David
  15. DAVID3733

    Lloyds cardnet connector

    Thank you for replying, only just seen it
  16. DAVID3733

    Lloyds cardnet connector

    Hi everyone Running later 2.3.4.1 CE bs4, apache 2, php 7.2.16 Was just setting up credit card merchant account with LLoyds (UK), can be done with either something like sage pay or their own, but cannot see a direct connector to Lloyds on the oscommerce site Does anyone else use cardnet and if so what connector do you use Thank you David
  17. DAVID3733

    Lloyds cardnet connector

    Hi Heather Never heard back from Sage pay after making the application and been in hospital so did not chase them yet Did notice on installing Sage pay for form, following error This module requires Mcrypt to be enabled in PHP and will not load until it has been enabled on this webserver. Looks like Mcrypt has not been supported since PHP 7, what version of PHP are you running, mine is 7.2 or is there a updated version of sage page somewhere Regards David
  18. DAVID3733

    Lloyds cardnet connector

    @Heatherbell Found the application ob the Sage website, think there sales team was just trying to sell I have made the application online and will see what what they say thank you for getting back Regards David
  19. DAVID3733

    Lloyds cardnet connector

    Hi Heather Thank you for replying, Just tried to contact Sage page, thought dealing with Cardnet was a nightmare, no further forward just wanted to confirm prices are you saying that Sage form, is about £20 flat fee per month and no other charges, I got the impression that they also wanted a percentage of the sales, already paying Cardnet/Lloyds a percentage too Regards
  20. DAVID3733

    Lloyds cardnet connector

    OK now have CARDNET approved, not sure if i would recommend anyone else doing it, it took a long time I have virtual terminal and pay by URL which is quite a good idea but now need to look at taking credit card payments on the website Can anybody tell me where to go from here, just want a hosted option, it does not look like Lloyd's do one direct for oscommerce but somebody must have something set up, do I look at something like sage page or something, I feel like i have missed something very obvious but cant put my finger on it. Thank you David
  21. DAVID3733

    Request Product Reviews

    As a update now I have everything working I thought i would catalog what I had done to help others and to remind myself when I have forgotten I am not a coder, just a shop owner so cannot give advice, and what I have done may not be very slick but its working Running 2.3.4.1 CE BS4, and PHP 7.2.16 I wanted a email to go out to request a review 7 days after "dispatch", as some of our products are ordered in especially, some we import in direct and some have to be made, so there can be no specific approx time after the order was made, and sending out a request for a review before the good were delivered is a no-no. Also on "dispatch" I wanted to send a email out at the end of the day with, link to their Invoice, a care sheet for the product which is important, we use a number of different couriers so contact and website tracing address for all of them (tracking number sent direct from admin when advised of dispatch), even put a voucher in there for good measure. I used the version 1.01 dated 18th February 2008 downloaded from below link http://www.oscommerce.com/community/contributions,5471 I do not use filenames in my version of OSC, there was a little bit of editing of review_mail.php but not much, PHP error log on my server proved a very informative place for finding the errors after the SQL was installed, which went without a hitch using PHP my admin INSERT INTO `configuration` VALUES (NULL, 'Days delay for review email', 'REVIEW_REMINDER_DELAY', '10', 'Number of days to wait before sending a review reminder email', 1, 998, now(), now(), NULL, NULL); INSERT INTO `configuration` VALUES (NULL, 'Review email limit', 'REVIEW_REMINDER_NEWSLETTER', '1', 'Send review reminder email only to customers who accept newsletters (set to 1)', 1, 999, now(), now(), NULL, NULL); ALTER TABLE `orders` ADD `reminder_sent` tinyint(1) NOT NULL default '0' AFTER `orders_status`; you must also set the - remonder_sent to 1, this stops you sending out to all your old orders while you are testing so do not forget it UPDATE orders SET reminder_sent = 1 As I stated I also wanted to send a different email out upon dispatch so i duplicated what i had done previously with a few changes INSERT INTO `configuration` VALUES (NULL, 'Days XXXXXXchangedxxxxxxdelay for dispatch email', 'XXXXXXchangedXXXXXDISPACTED_REMINDER_DELAY', 'XXXXXXchangedXXXXX0', 'Number of days to wait before sending a XXXXXXXXchangedXXXXX dispacth reminder email', 1, XXXXXXXXXchangedXXXXXX1001, now(), now(), NULL, NULL); Didnt need a copy of REVEIW_REMINDER_NEWSLETTER ALTER TABLE `orders` ADD `XXXXXXchangedXXXXXdispatched_sent` tinyint(1) NOT NULL default '0' AFTER `orders_status`; And of course don't want the emails going out while testing so UPDATE orders SET dispatched_sent = 1 Now the next problem I am using SEO-URL-5 and status handler, these caused problems, I do not know enough to know why, but noticed earlier in the thread that there was a fix from user - bassmaga this fix basically said in terms i understand that if the file requesting this page is review_mail.php then do not bother including URL-SEO t was called in catalog/includes/functions/html_output.php if (basename($_SERVER['SCRIPT_FILENAME']) != 'review_mail.php') { require_once DIR_WS_MODULES . 'ultimate_seo_urls5/main/usu5.php'; } I also had a request for a file (status handler) the file in catalog/includes/functions/general.php I would not have known about these if i hadn't been using the php error logs in my server to find issues becuase I do not really know what i am doing and could get "OR" or "||" working and i wanted to use more than one version of review_mail.php I changed it to $email_workaround = basename($_SERVER['SCRIPT_FILENAME']); $email_workaround_list = array ('review_mail3.php','review_mail.php','dispatched_mail.php'); if (in_array ($email_workaround,$email_workaround_list)) {} else{ require_once 'includes/modules/ultimate_seo_urls5/main/usu5.php'; } you will note that I have 3 files now 'review_mail3.php','review_mail.php','dispatched_mail.php' I have review mail in twice becuase we have 2 dispatched status codes, 3 and 50540, bit messy i know but our database goes back many years plus my new dispatched_mail.php Now I can run 3 cron jobs every night to send out the emails if you rename a copy of review_mail.php then remember to also keep the same name for template review_mail.tpl, ie review28_mail.php review28_mail.tpl Do not know much about templates but would recommend you use tables in them, seems to work much better and easier to keep things where you want them I would also recommend "Burts" "Order Keys" with this there is no need for the customer to log in, this is done for them, cannot find it on here, but if you search user name "Burt" I am sure he will point you in the right direction Kindest regards David
  22. DAVID3733

    All Products SEO

    Hello I am not a expert but would thinks that main crawlers would have no problem navigating a modern OSC website Plus you have whats new, that can show all products, also if it has pagination and view-all then every product is available on a single page to the crawler, I am guessing that any version of OSC that is using BS4 would have these capabilities already, check you have them activated as header tags, without adding another module to complicate and increase the bots ability to crawl your site, remember they do have a limit of the number of pages they will crawl in a day and duplicating whats already available to them might not be the best use of the crawl budget But like i said, no expect just a shop owner regards
  23. DAVID3733

    Request Product Reviews

    Hello We have 2.3.4.1 CE BS4 running on php 7.2 plus Just to say this contribution is working on our set up, It was not straight out of the box but any changes that were needed were available in this thread to enable it to work, using php errors log on the server to pick out the issues made it easier Probably going to use the framework for other emails we send to clients after dispatch to when have more time, we always on a previous version used a autoresponder but could not find suitable alternative to work with PHP7 Have fun David
  24. DAVID3733

    ULTIMATE Seo Urls 5 - by FWR Media

    Hi there Mountain Man I can not tell what the problem is as but a shop owner, I can say that I had lots of very strange issues with caching and I would look there first, the only one I could get working reliably was file, and even then I would still look in ftp to see if they were deleted properly after using reset in admin regards
  25. DAVID3733

    ULTIMATE Seo Urls 5 - by FWR Media

    Update piernas, the author of the R2.09 changes was kind enough to contact and provide some changes for me to test, I can confirm this solve the issue and the Hreflang can now be seen by search engines, I believe he will be posting the fix shortly, also he is lloking into the X-Default tag which is the last missing piece of the puzzle Regards
×