Jump to content
Latest News: (loading..)

puggybelle

Members
  • Content count

    856
  • Joined

  • Last visited

About puggybelle

  • Birthday 08/02/1966

Profile Information

  • Real Name
    Andrea
  • Gender
    Female
  • Location
    Central North Carolina
  • Website

Recent Profile Visitors

10,650 profile views
  1. That worked perfectly! Thanks so much!
  2. Never did figure out how to fix the code to allow a percentage symbol to be manually entered when creating a coupon. Fixed amount has always worked since the server switch, so... My workaround, if you will, is to do this: I want a coupon worth 25% off a purchase of $25 or more. I create a coupon using the amount of 25. No percent symbol to follow as that blows up. My coupon, at the moment, is now worth $25 off a purchase of $25 or more. Then, i go into PHPmyadmin and select my database. I click on Coupons and see my newly created coupon. I select it and click Edit. I change the coupon_type field from type F to type P. From fixed price to percentage. Then I click Go. I now have a coupon active in the site for 25% off. Clearly shows as such in Admin, as well PITA, but...better than nothing!
  3. I have another contribution installed called Advanced Specials which IS working when I enter a % symbol. Looking at the code, I'm seeing different language, if you will. The code is referencing decimals like this: if(preg_match("/^[0-9]{1,3}([" . $currencies->currencies[DEFAULT_CURRENCY]["decimal_point"] . "][0-9]{1," . intval($currencies->currencies[DEFAULT_CURRENCY]["decimal_places"]) . "})?%$/", $discount)) The server likes that very much. The chunk of code that's blowing up in the coupon_admin.php file looks like this: if (substr($HTTP_POST_VARS['coupon_amount'], -1) == '%') $coupon_type='P'; Entering a % symbol blows the whole thing when creating a coupon. Works great when applying price discounts in advanced specials, though. Any way to rewrite the coupon code snippet above? Perhaps something similar to the first code snippet I posted from Advanced Specials? Decimal this, decimal that? Am I even in the ballpark here?
  4. Switched to a new server which uses PHP 5.2.17 and MySql 5.6.38 and ever since, I'm having issues with lots of things. Yes, I'm running an old version of osCommerce - 2.2 Been able to work around most of it, but when trying to create a discount coupon with an assigned percentage - like 20% off a purchase of $25 or more - I get the following error: 1366 - Incorrect decimal value: '20%' for column 'coupon_amount' at row 1 The problem is the % mark. I've tried adding code to the coupon_admin.php file to deal with the percentage sign, but it's not working. I added: $_POST['coupon_amount'] = preg_replace('/[^0-9.%]/', '', $_POST['coupon_amount']); No luck. It's the only thing left to fix since the server switch - any ideas? Thanks!
  5. Automatically send data feed to Froogle

    I changed the word 'images' to 'photos' and ran the Googlefeeder. It worked perfectly! The merchant feed is now showing items pending - no more image errors. Thanks!
  6. Automatically send data feed to Froogle

    Google Merchant Center is no longer happy with my feeds. Says the images are too small. I assume they're referencing the photos from the images folder, the thumbnails that are sized as 75 X100 and the minimum size accepted is 100 x 100. Is there any way to change where the images are being pulled from in the googlefeeder.php file? Instead of being pulled from mysite.com/images I'd like them pulled from mysite.com/photos The photos folder holds the same-named images in much bigger file sizes. Thanks!
  7. Search and replace text in 10,000 item descriptions

    Firstly, Thanks to everyone who responded. This forum is beyond terrific. And Scott (Greasemonkey)...you are a ROCK STAR! I tried what Frank suggested in a test site I have and got the dreaded 'you have an error in your SQL syntax' message. I'm no programmer, so I got frustrated and quickly moved on. Phil - I backed up the database and downloaded it to my hard drive only to worry that I had no idea how to go about putting that edited file (Notepad worked great, by the way) back up in the website! FTP? I think I was worried about the size of the file. I mean, when I use my FTP client the server is set up to show me something like 1998 images max - when there are many more than that. I guess I feared that I wouldn't be able to get the entire database back in the site, if that makes sense. Then I tried what Scott proposed. Firstly, I just tried to see if it would replace all instances of http with https and it worked perfectly. Then, I sat and worried a bit about the forward slash when replacing .net/cat with .com/dog, but...I won't know til I try, so...I hit Go and it was flawless. Thank You all so much! Now I'm on to figuring out to have the entire site run in SSL..maybe then I can relax.
  8. Is there any way I can use cPanel to make a mass change in my product descriptions? I need to change some hard coded urls in my descriptions. Firstly, I need to change all instances of HTTP to HTTPS Secondly, I need to change the filepath of the urls, as well. Years ago I bought a .net domain as the .com was unavailable. All stock photos were saved in the .net domain. Sometime later, .com became available but I continued to use the .net path for linking photos in my item descriptions. Google Chrome has now become a PITA and I need to change everything and convert the entire site to HTTPS Example: I need to change "http://www.mysite.net/cat/123.jpg" to "https://www.mysite.com/dog/123.jpg" Change all instances of HTTP to HTTPS Change the filepath of .net/cat to .com/dog All stock photos have been copied from the .net/cat folder to the .com/dog folder and, yes, SSL is installed These are all urls that were hard coded in every item description created in the Admin side of the site Is there any easy way to do this or am I stuck manually editing 10,000 files? Thanks in advance for any help!
  9. I've downloaded the OSC to CSS package and cannot extract the files. Everything is password protected. Can you please upload a new package or instruct me on how to extract the files - Thanks!

  10. Me again. I received no replies so I went fishing with my webhost. I thought...maybe the server is showing the wrong date and time? But, no. They're fine. So, out of desperation, I began toying with that mysql function near the top of the rss file. function mysqlTimestamp2unix($input){ $y = substr($input,0,4);$m = substr($input,6,2);$d = substr($input,9,2); $h = substr($input,12,2);$min = substr($input,15,2);$s = substr($input,18,2); return mktime($h,$min,$s,$m,$d,$y); Basically, I just monkeyed around with the numbers. I ended up with this in order to get the correct date and time to appear in my RSS feed. function mysqlTimestamp2unix($input){ $y = substr($input,0,4);$m = substr($input,5,3);$d = substr($input,8,2); $h = substr($input,11,2);$min = substr($input,14,2);$s = substr($input,18,2); return mktime($h,$min,$s,$m,$d,$y); Does anyone forsee any problems with that? I mean...I'm concerned that I had to do that at all. I looked at other contribs which have an RSS feed, like Articles Manager, and their code is identical to what I started with. I searched the support thread for that one and no one said a word about having the wrong date & time appearing. On that note....can someone who knows their way around this kind of thing explain the meaning of those numbers? For example, the part of the code that reads $m = substr($input,6,2); I had to change those numbers to 5 and 3 in order to generate the correct date on the RSS feed. I've been Googling all day and...nothing. What do those numbers represent? What do they mean? - Andrea
  11. I installed the contribution, Article Blog, yesterday afternoon. Had to tweak a few things and add a missing file definition, but the only problem I have left is the RSS feed is showing the wrong date and time for the articles. They're showing as created on Sunday, February 07, 2010 at 3:08 am. This is the file being used: <?php /* $Id: index.php,v 1.1 2003/06/11 17:38:00 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License Prepared by Lunaxod http://www.charger.od.ua */ header("Content-type: application/rss+xml"); require('includes/application_top.php'); function mysqlTimestamp2unix($input){ $y = substr($input,0,4);$m = substr($input,6,2);$d = substr($input,9,2); $h = substr($input,12,2);$min = substr($input,15,2);$s = substr($input,18,2); return mktime($h,$min,$s,$m,$d,$y); } //1234567890123456789 //2009-03-01 12:00:00 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_RSS); $language_query = tep_db_query("select code from " . TABLE_LANGUAGES . " where languages_id = '" . (int)$languages_id . "'"); $language_code = tep_db_fetch_array($language_query); $code_lang = $language_code['code']; echo "<?xml version='1.0' ?><rss version='2.0'><channel>\n <title>" . ARTICLE_TITLE . "</title>\n"; echo "<link>" . HTTP_SERVER . "</link>\n"; echo "<description>" . ARTICLE_DESCRIPTION . "</description>\n"; echo "<language>" . $code_lang . "</language>\n"; echo "<docs>" . HTTP_SERVER . DIR_WS_CATALOG . FILENAME_RSS . "</docs>\n"; $article_query_raw = tep_db_query("select nd.name, n.date_created, nd.content, n.id from " . TABLE_ARTICLE . " n, " . TABLE_ARTICLE_DESC . " nd where nd.language_id = '" . (int)$languages_id . "' and n.id = nd.article_id order by n.id desc limit " . ARTICLE_RSS_ARTICLE); while ($content_rec = tep_db_fetch_array($article_query_raw)) { echo "<item>"; $headline = $content_rec['name']; $mydate = mysqlTimestamp2unix($content_rec['date_created']); $date = date('r',$mydate); $content_1 = substr($content_rec['content'], 0, ARTICLE_RSS_CHARACTERS); $content = strip_tags($content_1); if (strlen($content_rec['content']) > ARTICLE_RSS_CHARACTERS) { $content = $content . "...."; } echo "<title>$headline</title>\n"; echo "<pubDate>$date</pubDate>\n"; echo "<description>$content</description>\n"; $item_link = HTTP_SERVER . DIR_WS_CATALOG . FILENAME_ARTICLE . "?article=" . $content_rec['id']; echo "<link>$item_link</link>\n"; echo "<guid>$item_link</guid>\n"; echo "</item>\n"; } echo "</channel></rss>"; ?> Ran my feed URL thru an online validator and it validated fine, with the exception of that last line. The validator came back with this: Not quite sure what to do there, but...my biggest headache is the incorrect date and time. Does anyone know what would be causing that? The dates on the articles within the website itself and in Admin are correct. It's only the RSS feed that's generating the wrong dates. Any ideas? - Andrea
  12. I couldn't find a support thread for this. I've downloaded and installed a contribution called Scrolling New Products. The author modified it so that any items on special won't appear in the box. I guess this was done so there wouldn't be conflict for those who also use the Scrolling Specials box. Well...I don't use the Specials box. I do use the New Products box and would like new items that are marked down to appear in it. I've monkeyed with it a bit and am able to get the newly listed items with a special price to appear in that box, but I cannot get the sale price to appear, only the original price. Here's the original code from the contrib...can you alter it so that new items on special appear with their original price, followed by the sale price? ?> <!-- new products //--> <tr> <td> <?php $rp_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, p.products_price, pd.products_name from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id where products_status = '1' and p.products_id not in (select products_id from " . TABLE_SPECIALS . " where status = 1) and pd.language_id = '" . (int)$languages_id . "' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS); //Changed following line to preceeding line to correct doubles & more in scrolling new products box. // $rp_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, p.products_price, pd.products_name from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id where products_status = '1' and p.products_id not in (select products_id from " . TABLE_SPECIALS . " where status = 1) order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS); if (tep_db_num_rows($rp_query)) { $i = 0; while ($random_product = tep_db_fetch_array($rp_query)) { $pausecontent_np[$i] = "<center><a href=\'" . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product["products_id"]) . "\'>" . tep_image(DIR_WS_IMAGES . $random_product['products_image'], tep_output_string($random_product['products_name'], array('"' => '"', '\'' => ''', '<' => '<', '>' => '>', '&' => '&')), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . "</a><br/><a href=\'" . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . "\'>" . tep_output_string($random_product['products_name'], array('"' => '"', '\'' => ''', '<' => '<', '>' => '>', '&' => '&')) . "</a><br/>"; if (intval($random_product['specials_new_products_price']) > 0) { $pausecontent_np[$i] .= "<s>" . $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . "</s><br/><span class=\'productSpecialPrice\'>" . $currencies->display_price($random_product['specials_new_products_price'], tep_get_tax_rate($random_product['products_tax_class_id']))."</span></center><br/><br/>"; } else { $pausecontent_np[$i] .= $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . "<br/></center><br/><br/>"; } $i++; } ?> <?php } ?> Thanks!
  13. [Contribution] SEO-G

    Actually, the author of this contrib is now selling it for $499 from his own website. He doesn't support it in this forum anymore. I'm posting because I'm having issues with it, too. I've had it for a few years now. Recently, my site started running very slowly and I contacted my webhost. They told me they saw a ton of SQL queries to my database, looked something like this: I looked at the Reports section in SEO-G in Admin and it had recorded a whopping 19,000+ SEO-G URLs. I have around 4,000 products listed. Throw in a hundred or so other pages that would be generating SEO-G URLs, like mysite.com/privacy.html and there really should only be a little over 4,000 URLs being recorded, right? I noticed that many of the product URLs are being recorded multiple times, with different extensions. Page numbers, if you will. For example, I'll have a correct URL of mysite.com/name-of-product.html That entry will be followed by 4 or more that read, in order, name-of-product-p2.html, name-of-product-p3.html, name-of-product-p4.html and so on. It's the same item yet it's generating multiple SEO-G URLs. Anyone know what could be happening? I'm like the guy above...I'm just deleting reports completely every day now in order to keep the site running fast.
  14. Monkeying with the query and I'm getting somewhere. At present, the specials will only show when you click on the category they're actually listed in. For example, if you have the following category setup: People Magazine The 90's 1991 1992 1993 The item on special in year 1993 will only appear onscreen when you select 1993 from the dropdown. If you select The 90's you get zero results. Same with the main parent category of People Magazine. I've changed the query, and this enables you to see the specials for 1993 when selecting either 1993 or The 90's. Replace what FOD offered with this: if (isset($categories_id)){ if (empty($categories_id) && $categories_id==""){ $specials_query_raw = "select p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s where p.products_status = '1' and s.products_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and s.status = '1' order by s.specials_date_added DESC"; } else{ $specials_query_raw = "select p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s, " . TABLE_PRODUCTS_TO_CATEGORIES . " pcat, " . TABLE_CATEGORIES . " cat where p.products_status = '1' and p.products_id = pcat.products_id and pcat.categories_id = cat.categories_id and ((cat.categories_id = " . $categories_id . " or cat.parent_id = " . $categories_id . ")) and s.products_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and s.status = '1' order by s.specials_date_added DESC"; } } Still can't figure out how to select the main category of People Magazine and have it display specials for all the cats beneath it, but...it's better than nothing! Perhaps some query-gurus out there can take a shot at it? - Andrea
  15. Thanks from me, too. :thumbsup: That works! I have the same concern as 87up. Is it possible to have that query filter specials when selecting the main category (even though there are no products actually in it) rather than have to select the sub-categories below them to find the specials? Either way, this is terrific help you gave, FOD, Thank You! - Andrea
×