Guest Posted April 4, 2010 Share Posted April 4, 2010 Did you try the code I posted? If that doesn't show the problem, post the page you are trying to get the price from and I will take a look. I have tried both of the code fixes posted. I can get it to display Their Price = My price = and it shows my price but it doesn't show their price. One page I've tried it on is http://www.chutingstargear.com/index.php?main_page=product_info&cPath=6_8&products_id=29 There are a couple of places where the price shows up and I've tried several variations of both. I hope you can help me figure this out because I think this is a pretty cool contribution. Thanks for taking a look. BTW, I'd like to pull prices from a page like the following, but I'm guessing a page with multiple products would pose a problem. If my assumption is a bad one, please enlighten me. http://www.paragear.com/templates/parachutes.asp?group=5&level=1 Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted April 5, 2010 Author Share Posted April 5, 2010 Which is their page? Which is your page? What comparison code are you using? Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Guest Posted April 5, 2010 Share Posted April 5, 2010 Which is their page? Which is your page? What comparison code are you using? Neither one is my page. I listed two competitors' pages, one with a single product listed and one with multiple products listed. I've tried to get a comparison for the Altitrack (which is listed on both pages) to mine. For now, I'll try to focus on what should be the simpler problem, the comparison to the single-product page. Once that is figured out, I'll see if I can master the comparison on the multiple-product page. For this page http://www.chutingstargear.com/index.php?main_page=product_info&cPath=6_8&products_id=29 I'm currently using this search string: <title>Altitrack [Altitrack altimeter] - (.*) : Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted April 5, 2010 Author Share Posted April 5, 2010 Neither one is my page. I listed two competitors' pages, one with a single product listed and one with multiple products listed. I've tried to get a comparison for the Altitrack (which is listed on both pages) to mine. For now, I'll try to focus on what should be the simpler problem, the comparison to the single-product page. Once that is figured out, I'll see if I can master the comparison on the multiple-product page. For this page http://www.chutingstargear.com/index.php?main_page=product_info&cPath=6_8&products_id=29 I'm currently using this search string: <title>Altitrack [Altitrack altimeter] - (.*) : The code is failing because there is text as part of the price. Try this. In includes/moudles/comparemyprice.php, find $their_price = str_replace("$", "", strip_tags($price[0])); and replace it with preg_match('/([\d]+)/', strip_tags($price[0]), $match); $their_price = $match[0]; The compare string should be Starting at:(.*)</h2> Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Guest Posted April 5, 2010 Share Posted April 5, 2010 (edited) The code is failing because there is text as part of the price. Try this. In includes/moudles/comparemyprice.php, find $their_price = str_replace("$", "", strip_tags($price[0])); and replace it with preg_match('/([\d]+)/', strip_tags($price[0]), $match); $their_price = $match[0]; The compare string should be Starting at:(.*)</h2> That worked. The only thing I noticed was that it shows up at the bottom instead of the top of the listing now. Thanks!!! Edited April 5, 2010 by baddog Quote Link to comment Share on other sites More sharing options...
Guest Posted April 5, 2010 Share Posted April 5, 2010 (edited) That worked. The only thing I noticed was that it shows up at the bottom instead of the top of the listing now. Thanks!!! I can see that constructing the search string is somewhat of an art form. I have tried a few variations on this page: http://marketplace.amazia.com/para-service/prodinfo.asp?cn=566331&affid=&sku=HA7019&page=34&pagenumber=1&inverrmsg= It's picking up numbers from color codes or something and not the product price. Any suggestions there? Also, am I correct that it would be futile to try to come up with a viable search string on a page like this: http://www.paragear.com/templates/parachutes.asp?group=5&level=1 Edited April 5, 2010 by baddog Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted April 5, 2010 Author Share Posted April 5, 2010 That worked. The only thing I noticed was that it shows up at the bottom instead of the top of the listing now. You have to position the comparemyprice code in product_info.php so the comparison displays where you want it to. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Jack_mcs Posted April 5, 2010 Author Share Posted April 5, 2010 (edited) I can see that constructing the search string is somewhat of an art form. I have tried a few variations on this page: http://marketplace.amazia.com/para-service/prodinfo.asp?cn=566331&affid=&sku=HA7019&page=34&pagenumber=1&inverrmsg= It's picking up numbers from color codes or something and not the product price. Any suggestions there? Also, am I correct that it would be futile to try to come up with a viable search string on a page like this: http://www.paragear.com/templates/parachutes.asp?group=5&level=1 For the first one: Current Price</b></font></td><td nowrap><font face="verdana, arial, helvetica" size=-1 color="#990033"><b>(.*)</b></ For the second one: It won't work on a page like that, at least, not without specialized coding, since there is more than one price. You need to find the actual product page, if one exists, and take it from there. Edited April 5, 2010 by Jack_mcs Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Guest Posted April 5, 2010 Share Posted April 5, 2010 For the first one: Current Price</b></font></td><td nowrap><font face="verdana, arial, helvetica" size=-1 color="#990033"><b>(.*)</b></ This one still doesn't work for me. Nothing is displayed. I guess that's better than the thousands of dollars it was showing before. :) Quote Link to comment Share on other sites More sharing options...
Guest Posted April 5, 2010 Share Posted April 5, 2010 This one still doesn't work for me. Nothing is displayed. I guess that's better than the thousands of dollars it was showing before. :) Okay, here's another one. It is showing the competitor's price as $143.00 instead of $143.99. Page: http://metalsunglasses.com/radwrapsunwi4.html Search string: Sale price: (.*)</span> I hope this feedback is helpful and not annoying. I love this contribution and hope it can be fine-tuned along the way. Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted April 5, 2010 Author Share Posted April 5, 2010 Okay, here's another one. It is showing the competitor's price as $143.00 instead of $143.99. Page: http://metalsunglasses.com/radwrapsunwi4.html Search string: Sale price: (.*)</span> I hope this feedback is helpful and not annoying. I love this contribution and hope it can be fine-tuned along the way. Try changing the line I posted as shown. I haven't tested it but I think it will work. preg_match('/([\d]+)/', ($price[0]), $match); to preg_match('/([\d.]+)/', ($price[0]), $match); Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Guest Posted April 5, 2010 Share Posted April 5, 2010 Try changing the line I posted as shown. I haven't tested it but I think it will work. preg_match('/([\d]+)/', ($price[0]), $match); to preg_match('/([\d.]+)/', ($price[0]), $match); Seems to have done the trick. Thanks again! Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted April 5, 2010 Author Share Posted April 5, 2010 You're welcome. I hope it is beneficial to your shop. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
dromano Posted June 2, 2010 Share Posted June 2, 2010 Hi Jack, excellent mod. It's working fine in my shop. I want to know is there is a way to know in admin section my price and the other price by a buttom like "check now". In this way i know if my price must change or let it. I apologize for my english. I hope you understand me. I think it's not easy work check products by products in products_info page to compare prices and if i dont see anything mean my price is bigger, but how much bigger is my price?. Think this in a big store with more 5000-10000 items. Thanks. Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted June 2, 2010 Author Share Posted June 2, 2010 Hi Jack, excellent mod. It's working fine in my shop. I want to know is there is a way to know in admin section my price and the other price by a buttom like "check now". In this way i know if my price must change or let it. I apologize for my english. I hope you understand me. I think it's not easy work check products by products in products_info page to compare prices and if i dont see anything mean my price is bigger, but how much bigger is my price?. Think this in a big store with more 5000-10000 items. Thanks. No, there isn't an option for that but it is a good idea. I will put it on the list for the next version. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
GoTTi Posted April 14, 2012 Share Posted April 14, 2012 is this compatible with 2.3? Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted April 14, 2012 Author Share Posted April 14, 2012 It hasn't been converted for 2.3 but it should still work for the most part. There's one file in admin that would cause a display error but that would be a relatively simple change. That assumes, of course, that you are comfortable with editiing files. If not, then I wouldn't suggest installing it. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
GoTTi Posted April 14, 2012 Share Posted April 14, 2012 (edited) ya im ok with editing file as long as i know what to do. im not a coder though, i wouldnt know what needs to be edited....if i install it and see any error could we trouble shoot and see if we can get this to work on 2.3? im ok with being the first ;) Edited April 14, 2012 by GoTTi Quote Link to comment Share on other sites More sharing options...
GoTTi Posted April 15, 2012 Share Posted April 15, 2012 having a mysql error right off the bat.... Error SQL query: CREATETABLE comparemyprice( unique_id INT( 11)NOTNULLAUTO_INCREMENT , url varchar( 255) default'' NOTNULL , search_str varchar( 48) default'' NOTNULL , site_name varchar( 48) default'' NOTNULL , products_id int NOTNULL , enabled tinyint( 1) DEFAULT'0' NOTNULL , language_id int DEFAULT'1' NOTNULL , PRIMARYKEY ( unique_id ) ) TYPE=MYISAM ; MySQL said: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYPE=MyISAM' at line 10 Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted April 15, 2012 Author Share Posted April 15, 2012 Remove the TYPE=MYISAM (but leave the ; after it) and it should work. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
GoTTi Posted April 15, 2012 Share Posted April 15, 2012 worked. thank you installing now. Quote Link to comment Share on other sites More sharing options...
GoTTi Posted April 15, 2012 Share Posted April 15, 2012 instructions says: That completes the installation. Go to admin->CompareMyPrice and add the sites to be checked. See the instructions on that page as to how to do that. Then goto the product page of your shop that you set up a compare for to see the results. when i go to admin i see CompareMy Price under configuration. I click that and all i see is a way to disbale or enable version checker. is there somewhere else i should be looking for the compare my price link? Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted April 15, 2012 Author Share Posted April 15, 2012 instructions says: That completes the installation. Go to admin->CompareMyPrice and add the sites to be checked. See the instructions on that page as to how to do that. Then goto the product page of your shop that you set up a compare for to see the results. when i go to admin i see CompareMy Price under configuration. I click that and all i see is a way to disbale or enable version checker. is there somewhere else i should be looking for the compare my price link? You're looking at the settings: admin->Configuration->CompareMyPrice. The instructions say to go to admin->CompareMyPrice. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
dromano Posted October 17, 2012 Share Posted October 17, 2012 Hi Jack, Comparemyprice works great, but I'm trying to compare competitors price 18,000.00 and only i can see as the competitors price 18.00. There's something that i can do to fix this ? Thanks in advanced Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted October 17, 2012 Author Share Posted October 17, 2012 It would seem that the comma in 18,000 is causing a problem. I didn't code it for anything over 999, thus the problem. Try this,untested, change. In includes/modules/comparemyprice.php, find preg_match('/([\d]+)/', strip_tags($price[0]), $match); and change it to: preg_match('/(\d+(,\d+)*(\.\d+)?)/', strip_tags($price[0]), $match); Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.