Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.


  • Content count

  • Joined

  • Last visited

Everything posted by gaverp

  1. gaverp

    KISS Page Titles

    KISS Page Titles I know there are other more significant and robust contributions for the purpose of generating Dynamic Page Titles for their shopping carts. The method defined below only requires the modification of 3 pages and is very "simple" to implement. As of this writing - I'm not certain how Google is going to interpret the titles I'm using - I'm still awaiting their first evaluation of my sitemap.xml file and initial crawl, I will post a result after the crawl and evaluation has completed. There are many other more experienced programmers on this board that could modify the code shown below to be more efficient - hopefully one of them will pitch in - This was a quick fix for my needs and not a long term solution for osCommerce in general. Final Caveat - My shopping cart is heavily modified and 60 hours distant from the initial installation. BACKUP! before you make any changes outlined below. Some background: The default installation of the osCommerce Shopping cart uses a value set in the Admin panel under the Configuration section titled "Store Name" to set the value used in the page title of ALL pages on your site. Don't worry though - there's really only a couple of pages that need to be modified to create dynamic page titles... Load index.php in your editor. Look for this code around line 40: <title><?php echo TITLE; ?></title> The "TITLE" variable is where the name of your store is being inserted into your index.php webpage each time the page is called by a customers browser. Using the standard "TITLE" variable with a minor modification - we can have it append the name of the Store Category to the "TITLE" variable so the webpage will display the name of the store followed by the name of the Category selected by the customer (or search engine). When a customer first loads your home page, the page title (set in admin) would read "Blue Shoes". The problem is - that same "title" is used on all of your pages... What you want to see is the page title of each page change to reflect the content that is being displayed. Example... If your store name is Blue Shoes and you have three categories - Sneakers; High Heels and Sandals, if a customer clicks on the Sneakers category - the page title should read Blue Shoes Sneakers. Now.. if you have 5 different styles of sneakers available on the Sneakers Page - and the user clicks on the one titled "High Top Sneakers" the page title would change to Blue Shoes High Top Sneakers. In some cases though - you might have included the name of your store as a keyword in the name of your product like Blue Shoes High Top Sneakers... so having the original store name -followed by the product name would appear to be "spamming" the search engine with keywords - which I believe may be a bad thing to do. For example... If you included your store name in your product description (as I did on many of my products) - it would appear in the Page Title as: Blue Shoes Blue Shoes High Top Sneakers. Not to worry though another very simple modification to the code will alleviate this problem too! Here's how to make the changes required to incorporate KISS Page Titles: Time to backup! I usually save a copy as "xxxx.bak" where "xxxx" is the original file name - if I have to revert back to the original - then I just delete the new file (or rename it to xxxx.BAD and then rename the original back to xxxx.php Back up the following 3 files: catalog/index.php; catalog/product_info.php; catalog/includes/application_top.php Now you're ready to revise the code. Step 1: On the index.php page you loaded previously replace this line: <title><?php echo TITLE; ?></title> With this one: <title><?php echo TITLE . ' ' . $page_name; ?></title> This change will enable your home page to display the categories selected by the user in the page title. Step 2: Load catalog/includes/application_top.php in your editor and locate the following line of code. $breadcrumb->add($categories['categories_name'], tep_href_link(FILENAME_DEFAULT, 'cPath=' . implode('_', array_slice($cPath_array, 0, ($i+1))))); Insert the following line of code immediately BELOW the line referenced above: $page_name = $categories['categories_name']; Now, in the same page, locate the following line of code, it should be several lines below the one you just modified: $breadcrumb->add($model['products_model'],tep_href_link(FILENAME_PRODUCT_INFO, 'cPath=' .$cPath . '&products_id=' . $HTTP_GET_VARS['products_id'])); Insert the following lines of code immediately BELOW the line of code referenced above: $product_name_query = tep_db_query("select products_name from products_description where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'"); $long_name =tep_db_fetch_array($product_name_query); $page_name = $long_name['products_name']; Step 3: Now load catalog/product_info.php into your editor and locate the following line of code: <title><?php echo TITLE; ?></title> and replace it with this line: <title><?php echo $page_name; ?></title> Note: if you DO NOT have duplicate keywords in the product name of your products, you can use the following line inplace of the one above. <title><?php echo TITLE . ' ' . $page_name; ?></title> Don't be afraid to try both styles - to see what affect it has on your page titles, and then choose the one that you believe is best suited for your Search Engine Friendly Page Titles. Now - upload your 3 modified pages - depending on which FTP program you are using - you can rename the existing UNMODIFIED files on your server with the .BAK extension, and then upload the modified (NEW) files to the server - that way if something is not right - it's a simple matter to delete the three files you just uploaded on the server and then rename the .BAK files to .php and ... you're back to the original un-modified pages. I hope others will find this modification useful in creating Search Engine Friendly Page Titles... Keeping it simple...
  2. I think there's an error in your SQL shown above. You are showing: select cd.categories_name, select cd.categories_description from categories c, categories_description cd where c.categories_id = '27' and cd.categories_id = '27' and cd.language_id = '1' and it should be: select cd.categories_name, cd.categories_description from categories c, categories_description cd where c.categories_id = '27' and cd.categories_id = '27' and cd.language_id = '1' BTW - MySQL.org is giving away an SQL utility program (actually a set of them) that allows you to connect to your osCommerce MySQL database; run queries on the DB; modify tables; add; modify or delete records. It's called MySQL workbench and can be seen / downloaded here: MySQL Workbench. You can connect remotely to your store database using the utility. Did I mention it was free? With the workbench utility program you can run queries (like the one above) and test it to see where the problems are - it has some minor SQL troubleshooting help - but the user interface is where the real "help" exists. Hope this helps... Gaver SurfboardSigns.com & AuthenticEndlessSummer.com
  3. gaverp

    Automatically send data feed to Froogle

    Calvin, Has anyone integrated your contribution with SEO G ? I tried searching this thread for the keyword "SEO G" and could not get past the 3 word filter restriction - so I appologize if it's previously addressed in one of the other 98 pages of this thread. I'm interested in using your contribution for a Google Base feed - but I used SEO G for my SEO URL construction. I've looked at the googlefeeder.php script and the SQL looks as though it will pull image locations from "different" directory structures - meaning it's not cast in concrete. What other significant SQL changes would be required to catch and use the HTML page names instead of the SEO Link page names the contribution was designed for? Regards,
  4. Looks like a really great contribution - I downloaded the zip file and read the coupons_manual.html file included in the package. It references users to view the included install.html file - which is not included in the 3.32 package. Any one know where to find a recent install.html file for this contribution? I tried searching this thread using "install.html" - without success. Regards,
  5. gaverp


    Just a heads up... I was having difficulty with the html tags being stripped from my html email messages when using FCKEditor and found a solution. In the ADMIN>FCKEDITOR>fckconfig.js file around line 35 change FCKConfig.FullPage = false ; change false to true and tags like HTML; BODY: BASE HREF etc. will stay intact. VERY cool contribution btw!
  6. gaverp

    Send Admin HTML e-mails

    Not certain if this is the recommended approach... To enable the display of the HTML email message in the mail.php?action=preview page, I modifed the following code: in Admin>mail.php Near Line 136: <tr> <td class="smallText"><b><?php echo TEXT_MESSAGE; ?></b><br> <?php echo nl2br(htmlspecialchars(stripslashes($HTTP_POST_VARS['message']))); ?></td> </tr> Changed to this: <tr> <?php $message = stripslashes($HTTP_POST_VARS['message']); ?> <td class="smallText"><b><?php echo TEXT_MESSAGE; ?></b><br> <?php echo tep_draw_fckeditor('message','750','700',$message); ?> </td> </tr> It appears to be working - still has all the FCKEditor buttons / icons though - which makes the whole process of "preview" somewhat redundant, especially since FCK has an excellent preview tool built in! Still looking for the fix for the EMAIL_FROM problem in item #2 above if anyone has an idea on how to fix that ... Regards,
  7. gaverp

    Send Admin HTML e-mails

    Update: I figured out how to prevent the HTML and BODY tags from being stripped off... In the fckconfig.js - set FCKConfig.FullPage = true ;
  8. gaverp

    Send Admin HTML e-mails

    I'm beginning to suspect there may be more wrong with my installation that previously noted. When creating an email message in the admin page I see the FCKEditor window and below it a "SEND MAIL" button. If I place html and body tags in the mail message by viewing the source and typing them in manually - when I click the "SEND MAIL" button , it takes me to the mail.php (same page) with the "preview" option set in the url. The page however is spread out over two or three times the anticipated height and the content of the HTML email is badly formed. It's as though the "preview" is not being contained in an HTML friendly container for preview purposes and instead the HTML contained in the email message is being "mixed and mashed" into the mail.php?action=preview page. At the bottom of the preview page there are three buttons... back; cancel and send mail. If I select send mail - and then view the source of the email as received - the HTML and BODY tags have been stripped out of the resulting message and replaced with a paragraph tag "<p>" It would appear that during the "preview" process the HTML is not being preserved or rendered correctly. Is there supposed to be an HTML friendly container for the FCKEditor $message variable to be displayed into during the preview process on the mail.php?action=preview page? I have done a differential comparison of the vanilla mail.php against the modified version and can not find an omission or problem that might be responsible for this anomaly. Although unrelated - I'm also unable to save templates. Clicking the Disk icon acts as though I clicked the send mail button at the bottom of the window. I have searched the FCKEditor.net website for terms relating to "save templates" and not had any luck determining how to capture the Disk Icon click event and route it to a different php page / script for saving a template. Any help resolving these issues would be greatly appreciated...
  9. gaverp

    Send Admin HTML e-mails

    I wasn't able to find a thread for this contribution either... (contribution: http://addons.oscommerce.com/info/5806) I installed the contribution and I'm using the FCK HTML editor. Works great - just one bug I'm trying to fix... The variable EMAIL_FROM in the ADMIN>mail.php file is wrong in my application - showing up as "WWW.MYDOMAINNAME.COM" <sales@mydomainname.com> which is a combination of the "from" and "from_name" variables, I think it's just supposed to be <sales@mydomainname.com>. Here's how the actual email header appears in the "From" field in the clients email: My Domain Name > ["My Domain Name" <sales@MyDomainName.com] Notice the misplaced ">" and duplicate name... <tr> <td class="main"><?php echo TEXT_FROM_EMAIL; ?></td> <td>TEST<?php echo tep_draw_input_field('from', EMAIL_FROM,'size="80"'); ?></td> </tr> I used eclipse to search for the variable by name "EMAIL_FROM" through every file and line of code and it does not appear to be defined anywhere? Anyone know where the variable "EMAIL_FROM" is picking up the combined values of "from" and "from_name"? Regards,
  10. Leslie, Could you point me to sample images of the HTML email messages with and without the row_mod_additions modification please. Or maybe send me a couple sample emails? Thank you,
  11. gaverp

    Linkpoint API Problems

    Iofast, Based on previous messages in this thread and others regarding site security - I got interested in deleting the card numbers from my database or more to the point - preventing them from being stored in the db from the start. When I examined the content of my db - I discovered there are no credit card numbers or information of any sort (cvv or exp date) currently being stored in the db. Despite this - my application handshake with the secure.linkpt.com appears to be working correctly. I looked in the orders table for this information - which is where the other data unique to the buyer is being stored. Is there somewhere else the cc information might be stored? Is this behaviour expected or is something amiss? Regards,
  12. gaverp

    Linkpoint API Problems

    Is the javascript validation routine in the linkpoint_api.php fle supposed to validate the CVV 3 digit code or was it intentionaly disabled? In looking at the code vs the 3 digit field it appears there may be an omission in the javascript function below... $js = ' if (payment_value == "' . $this->code . '") {' . "\n" . // ' var cc_owner = document.checkout_payment.linkpoint_api_cc_owner.value;' . "\n" . ' var cc_number = document.checkout_payment.linkpoint_api_cc_number.value;' . "\n" . // ' if (cc_owner == "" || cc_owner.length < ' . CC_OWNER_MIN_LENGTH . ') {' . "\n" . // ' error_message = error_message + "' . MODULE_PAYMENT_LINKPOINT_API_TEXT_JS_CC_OWNER . '";' . "\n" . // ' error = 1;' . "\n" . // ' }' . "\n" . ' if (cc_number == "" || cc_number.length < ' . CC_NUMBER_MIN_LENGTH . ') {' . "\n" . ' error_message = error_message + "' . MODULE_PAYMENT_LINKPOINT_API_TEXT_JS_CC_NUMBER . '";' . "\n" . ' error = 1;' . "\n" . // there's also a missing right brace at this location in the original script. ' }' . "\n" . ' if (cc_number == "" || cc_number.length < 3) {' . "\n" . ' error_message = error_message + "' . MODULE_PAYMENT_LINKPOINT_API_TEXT_JS_CVV_NUMBER . '";' . "\n" . ' error = 1;' . "\n" . ' }' . "\n" . ' }' . "\n"; return $js; } We could test the value of the CVV variable with something like this? var cc_cvmnumber = document.checkout_payment.linkpoint_api_cc_cvm.value; if so.. then the bottom "if" statement would need to be modifed to read like this: if (cc_cvmnumber== "" || cc_cvmnumber.length < 3) {' . "\n" . ' error_message = error_message + "' . MODULE_PAYMENT_LINKPOINT_API_TEXT_JS_CVV_NUMBER . '";' . "\n" . ' error = 1;' . "\n" . If modified.. then the linkpoint_api.php file located in the includes>languages>english>modules>payment directory will require the addition of a line something like this also... define('MODULE_PAYMENT_LINKPOINT_API_TEXT_JS_CVV_NUMBER', 'Missing the 3 digit Card Verification Value!'); Or was this intentionaly disabled for some reason? There's also a missing right brace in the javascript - I added it to the script shown along with a comment - so you can find it in your code. Regards,
  13. Todd, I tried to upload a new set of image files to one of the directories created by AI and I"m getting errors stating permission denied. So.. I tried to chmod the values of the files and that was denied also... Is there a way for me to delete files and upload replacements for them wihout having to utilize the admin panel and delete each one idividually for each product? Sure hope so.. Regards,
  14. Sam, Is splitpage supposed to work on product_new.php and new_products.php? I've spent a few hours now trying to find and fix the split page function on that page... I've got about 30 new products and can't get the splitpage to show up on the home page with all the "New products for December". It's working fine on the category pages... G
  15. Sam, I restored MAX_DISPLAY_RESULTS as suggested, where in admin can I set the value to 9? It appears to be defauting to 5.
  16. Thanks Todd, I wish I had that tip regarding resizing about an hour ago... I used the "utility" to generate images for all the products in one of my categorys and then noticed a very pixelated thumbnail was being used on the product_list and new_product pages... So - I removed all the images and created new thumbs and mids from the large image and uploaded them again. The problem I noted with the popup displaying multiple images went away after tweaking the admin panel some. Thanks for the references - I'll go check them out next... Another question for you - when I use one of the automated image generator routines - is it actually creating a smaller image and storing it somewhere or it is just generating them on the fly with each new http request? Thanks again,
  17. Wow... nice pilot ! :rolleyes: I looked at your example - then I created a "mid-sized" image and placed it on the server using the add image routine in the admin panel. Now I have the correct mid sized image (lower file byte count) and it's correctly scaled (100px X 150px), but when I click on the details (or image) it takes me to the details page, and when I click on the image there I get a popup window that appears to contain 3 very large images and some wording "VIEW" (?) Two of the images are out of the view port of the popup window.... You can see it first hand by going here: http://www.authenticendlesssummer.com and clicking on the Blue Denim Hoodie in the first row, second column. Then on the resulting product info page click on the image again to see the pop-up problem. So... anyone know what I managed to break?
  18. Thanks for all your assistance... Installation went pretty smoothly - appears however I may have broken the SEO-G contribution with the mod. Will tackle that later... For now I have a couple of questions I hope someone can help me with... 1) Is there a site somewhere that has incorporated this mod that is using multiple thumbnail images that I can see for reference? 2) If I already have some product / images on the site - what's the best way to "fix" them so they take advantage of the mod? Should I delete those products and start over again with fresh images / and product descriptions? 3) What are the "normal" sizes used for small; medium and large images for a manual upload, and what sizes will the contribution "automatically" resize a large image down to for the small and medium sizes when uploaded? Thanks again...
  19. I'll do that, I was hoping it was per design - since Shirts have options like color and size - adding it to the cart without first selecting one of the options would create a problem at order fullfilment time - whereas hats do not have a size or color option - so adding them directly to the cart and taking the user to the checkout page is desireable. I'm wondering what it will hurt to leave it as is - since the problem appears to be working to my advantage - for now. Regarding maxresults - you're right - that's a much better way to handle that! Thanks again - I'm trying now to integrate the Additional Images Contribution... thank goodness for WinDiff ! ... and thanks again for your contribution and assistance.
  20. Ok, to those of you offended by stupidity - please skip to the next thread or post. DO NOT READ THIS! I got the windiff application and I'm comparing the new contribution files to the current files in my application. There's a lot of code that is identified as NOT in my current code - but it is not marked with a // BOF. I have installed two other contributions - and If I have to go back line by line through them to figure out which (if either) of them may have removed the code referenced in the new contribution pages... we'll - it's going to be an ugly December... Do all the pages in the contribution include a // BOF marker for the code being added to the page - or does some slip thru from time to time without the marker? I told you not to read this... :D
  21. I just tried a fresh download from a different computer - problem solved - not sure why ... Thanks?
  22. Hello - I'm interested in trying the Additional Images contribution for my Cart. I dowloaded the zip file last night and tried to view the install_readme.txt file and it appears to be corrupted. Every letter has at least one space preceeding it and following it, making it very difficult to read. Would someone have a copy that is legible they could post, or tell me how to fix my copy? Regards,
  23. Sam, Excellent contribution! Installation went without a hitch - excellent documentation and instructions - I wish others were this simple to accomplish! I am hoping you can confirm the behaviour of the contribution as it relates to the "Add to Cart" functionality. I have two different types of products on my site right now - a basic hat (with no options) and Shirts (with size or color options). If I set admin to "Buy Now" button only - and it generates the "Add to Cart" option below each image, I get an item added to the cart when I click on a hat, or I get the "details" page for the product if I click on a shirt. Is this due to their being "options" for the shirts that the hats do not have? Check it out on the home page. Click the "Add to Cart" for a shirt then do the same for a hat.
  24. Hello Brock - I made the very changes you are referring to ... Here's how I did it... 1) Back up the existing product_list.php file so you have a copy to go back to incase this doesn't work out how you expect. 2) Find the following code near line 109 and comment it out. if ($top_nav && ($listing_split->number_of_rows > 0)) echo $drop; 3) Then find the following line of code near line 562 and comment it out. if ($base_nav && !$empty_list) echo $drop; After I made the changes above - I decided I wanted to set the max number of items being displayed - which of course I had just disabled by hiding the drop down list... You can set the max number by finding the following line of code near line 18: $max_results = (tep_not_null($_GET['max']) ? $_GET['max'] : MAX_DISPLAY_SEARCH_RESULTS); and changing it to: $max_results = 9; /*(tep_not_null($_GET['max']) ? $_GET['max'] : MAX_DISPLAY_SEARCH_RESULTS); */ Note: change the iteger value (I used 9) to the value you want displayed. You can see a sample "work in progress" for my product_list.php display here. Hope that helps...
  25. gaverp

    Linkpoint API Problems

    John, You may have gotten the linkpoint_api.php files crossed up during the upload to the server. Verify the one located in includes/languages/english/modules/payment measures about 1898 bytes, and that the one located in the /includes/modules/payment directory measures about 37,809 bytes. It's really easy to cross them up during upload. You might also want to re-upload the .pem file again - my FTP application defaulted to binary and it needs to be uploaded in ASCII format (according to this thread). The last option is to verify you have set all the admin variables according to instructions - it blows up there also. Lastly - you can run the SALE_MININFO.php script listed above and get a quick answer on if you server is configured to communicate with the staging.linkpt.net server or not. If you can get a response from their server then your ports are open for bidirectional communication, and then proceed to figure out what's amiss in osCommerce. Hope that helps... GP