Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

GemRock

Pioneers
  • Posts

    2,020
  • Joined

  • Last visited

  • Days Won

    3

Posts posted by GemRock

  1. for the admin side of osc2.3.1, just comment out the column_left so that it looks like this:

    <!-- left_navigation //-->
    <?php // require(DIR_WS_INCLUDES . 'column_left.php'); ?>
    <!-- left_navigation_eof //-->
    

    in the two files: header_tags_edit.php and header_tags_category_edit.php

     

    Ken

  2. i think i have missed afew posts (no email notification sent to me).

     

    for osc 2.3.1, you add this code to template__top.php between

    <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>" />
    

    and the 'base href' bit. changes to the application_top.php is the same as in osc 2.2. the results can be seen in my demo osc231 shop (accessed from my profile).

    <?php
    if (stristr($_SERVER['PHP_SELF'],'index.php')) {
    ?>
    <title><?php echo (strlen($title_tag) > 1) ? $title_tag . ' - ' . TITLE : $title_home_default . ' - ' . TITLE; ?></title>
    <meta name="description" content="<?php echo (strlen(strip_tags($desc_tag)) < 5)? $desc_home_default : strip_tags($desc_tag); ?>">
    <meta name="keywords" content="<?php echo (strlen(strip_tags($keywords_tag)) < 5) ? $kws_home_default : strip_tags($keywords_tag); ?>">
    <?php
    }else if(stristr($_SERVER['PHP_SELF'],'product_info.php')){
    ?>
    <title><?php echo ((strlen($categories['categories_name']) > 1) || (strlen($manufacturers['manufacturers_name']) > 1)) ? $header_tags['products_name'] . ' -' . $breadcrumb_tags->trail_tags(' ') . ' ' . TITLE : TITLE; ?>
    </title>
    <meta name="description" content="<?php echo $header_tags['desc_tag']; ?>">
    <meta name="keywords" content="<?php echo $header_tags[keywords_tag]; ?>">
    <link rel="canonical" href="<?php echo tep_href_link(FILENAME_PRODUCT_INFO,'products_id='. (int)$HTTP_GET_VARS['products_id']); ?>" />
    <?php
    }else{
    ?>
    <title><?php echo tep_output_string_protected($oscTemplate->getTitle()); ?></title>
    <?php
    }
    ?>
    

     

    for websites using sts, refer to the above.

     

    Ken

  3. what i can do is to offer a quick fix as i know little about your website.

     

    in product_info.php, below

    require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO);

    add:

    $mID_sql = tep_db_query("select manufacturers_id from " . TABLE_PRODUCTS . " where products_id = '" . (int)$_GET['products_id'] . "'");
    $mID_query = tep_db_fetch_array($mID_sql);
    $mID = $mID_query['manufacturers_id'];
    
    $manufacturers_query = tep_db_query("select manufacturers_name from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$mID . "'");
    
    $manufacturers = tep_db_fetch_array($manufacturers_query);
    $m_name = $manufacturers['manufacturers_name'];

    now, you get the manufacturers name, you can add it to wherever you want to. eg, add it to the title tag:

     

    <title><?php echo $header_tags[title_tag] . ' - '.$m_name. ' - '. TITLE; ?></title>

     

    Ken

     

    Hi Ken,

     

    Adding the manufacturers tag to the index.php page definitely helped. Sorry for this basic question, but I think I am misunderstanding you. Are you suggesting that the same code that was added to the index.php page should also be added to the product_info.php page?

     

    Thanks,

    Iffy

  4. read the previous page (page 38) post #755 onward, to see if that help?

    Ken

    Hi Ken,

     

    Thanks for an awesome contribution! It works great, but I have one hopefully minor problem. My Product_Info page doesn't display manufacturer, which I would really like to include. Not sure what the issue may be. I'm using the following title tag on my product_info.php:

     

    title><?php echo ((strlen($categories['categories_name']) > 1) || (strlen($manufacturers['manufacturers_name']) > 1)) ? $header_tags['products_name'] . ' - ' . $breadcrumb_tags->trail_tags(' ') . ' - ' . TITLE : TITLE; ?>

    </title>

     

    Thanks for your help.

    Best,

    Iffy

  5. hi Harald

     

    were you testing the out of box standard osc 2.2 , whereas in my mind i am thinking about those heavily added-on shops. my concern is to do with the 'mayhem' created by the upgrade of mysql from v4 to v5 just a couple of years ago when i spent, or rather, wasted, lots of time updating scripts.

     

    btw, it seams osc2.3.1 still uses the "array_merge($sql_data_array, $insert_sql_data)" the same as the earlier osc versions. dont if theres some magic somewhere in v2.3.1 that i am aware of?

    dont get me wrong. i am not against technical progress. just feel like it has to do slowly, and i think sometimes the progess is made by purely peer to peer review or pressure.

     

    Ken

  6. Not quite right, ...

     

    i think you somehow missed this bit in my post:

    ...unless for some bizarre reason you want to use its so-called 'direct payment'...

    thats a typical example of entering card details on your web shop.

     

    @ Harald: i dont know when but would reckon some time in the future, not something that would happen in the next few months. as for php.net's position of abandoning php v5.2.x, i think its a bit of irresponsicible given the large user base (just think about how many osc2.2 shops in the past nearly 10 yrs time, let alone other apps) of v 5.3's earlier versions, and it knowingly creates incompatibility between the old and the new.

    "if it aint broke, dont fix it", after all.

     

    Ken

  7. Here's a boost ......

     

    not quite. how many onlineshops need pci? very few and only those who is big enough to have a dedicated server, and if you have a dedicated server, do whatever you like.

    for argument sake, paypal (which i dont like btw) speaks loud and clear its taken the pci hassle out of majority of online shops by having its server(s) pci'ed so that you dont have to, unless for some bizarre reason you want to use its so-called 'direct payment'.

    and so is true for other payment processing providers.

    bottom line: if you do not store card details in your database on the server, pci is irrelevant, and so is php v5.3.x.

    ken

  8. i may not seriously understand your definition of 'complaining' but i certainly seriously know very well about osc, and would not come here to ask such a silly question (in fact never ask any question or help on the osc forums).

    i simply suggested you may have downloaded the wrong version, or the verstion you downloaded had been 'contaminated'. if neither is the case then only you yourself know what happen to your installation.

    giving out free time to answer questions is a thankless business, which is partly the reason why i no longer come here often.

     

    ken

  9. ... remain in polish ??? Any ideas?

     

    the idea is: you should have been more careful. the lastest released was on 15 Jan 2011, and the next latest released was called Ultimate SEO 2-2.2d-10 Polish Language Pack that says it has been translated fully into polish. so if you downloaded that one then you are asking for it and then come here to complain...

     

    ken

    ps, mentioning the versions does not mean i approve or disapprove them. you make your judgement.

  10. no, its certainly NOT for vanilla oscommerce. it can be used on any osc shops however modified these shops may have been, and can even be used for v2.3. if you spend time to understand how it works then you can further modify it for your own needs - its only one file ie the seo class (and on this note dont believe one that has been broken into several segments to make it looks more "professional" unnecessarily complicated). Chemo may no longer with us (he passed away last year) but his addon still widely used.

    sorry i dont understand/know your problem with THIS addon so can't help. but i do believ its not this addon's problem, its more likely your shop may need to modify or have this addon modified so that both can work the way you like.

    ken

  11. the only possible reason for no-show of the manu. list could be the language id. try to change this line 204:

    	$manufacturers_query_raw = "select manufacturers_id, manufacturers_name, title_tag, desc_tag,  keywords_tag from " . TABLE_MANUFACTURERS . " where language_id = '$languages_id' " . " $sort_by ";

     

    to

     

    	$manufacturers_query_raw = "select manufacturers_id, manufacturers_name, title_tag, desc_tag,  keywords_tag from " . TABLE_MANUFACTURERS .  " $sort_by ";

     

    assuming you only have one language. you can look at the table to see if there is any language id. if there is, then somehow the variable $language_id is empty.

    Ken

  12. sorry i forgot that. yes you need to make change to index.php. try to add this code just before:

    require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFAULT);

     

    if (isset($_GET['manufacturers_id'])) {
    $manufacturers_query = tep_db_query("select manufacturers_name,title_tag,desc_tag,keywords_tag from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'");
    if (tep_db_num_rows($manufacturers_query)) {
     	$manufacturers = tep_db_fetch_array($manufacturers_query);
     	if (strlen($manufacturers['title_tag'])>3) {
       	$title_tag = $manufacturers['title_tag'];
     	} else {
       	$header_manifacturer = $manufacturers['manufacturers_name'] . ' - ';
     	}
     	if (strlen($manufacturers['desc_tag'])>5) {
       	$desc_tag = $manufacturers['desc_tag'].' - '.$desc_home_default;
     	} else {
       	$desc_tag = $manufacturers['manufacturers_name'].' - '.$desc_home_default;
     	}
     	if (strlen($manufacturers['keywords_tag'])>5) {
       	$keywords_tag = $manufacturers['keywords_tag'].' - '.$kws_home_default;
     	} else {
       	$keywords_tag = $manufacturers['manufacturers_name'].' - '.$kws_home_default;
     	}
    }
    if (isset($_GET['filter_id']) && tep_not_null($_GET['filter_id'])) {
       	$cat_tags_query = tep_db_query("SELECT categories_name, title_tag, desc_tag, keywords_tag FROM " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$_GET['filter_id'] . "' AND language_id = '" . (int)$languages_id . "'");
       	$cat_tags = tep_db_fetch_array($cat_tags_query);
       	$title_tag  = $header_manifacturer . $cat_tags['categories_name'] . ' - ';
       	}
    }

    feel free to make further changes to suit your needsad the code may be customised that site only.

    Ken

     

    I uploaded the file and added a link to admin/includes/boxes/catalog.php and added a line to the language file and filenames.php. Three new fields are added to the database table manufacturers. But I have two problems. There is no manufacturer listed in the table where i can edit the manufacturers header tags. I entered the header tags directly in my database, but when I opened the manufacturers page the defealt header tags were shown. Do i have to change code in index.php?

     

    Paulien

  13. found it (header tags for manufacturers) but haven't got the time to add it to the package so not a formal release. download zip file HERE, just a single file combining the language definition. unzip it then upload to (admin)/ folder. add a link to the (admin)/includes/boxes/catalog.php. let me know if there is any problem (do not expect any) so that i can fix it and add it to the package.

    Ken

  14. Hi Paulien

     

    i seem to have done a on-the-spot mod that is exactly what you requested for a site but at the moment cant remember which site. will have a look and post back here.

     

     

    Hi Ken,

     

    Great contribution. Is it also possible to have seo header tags for manufacturers pages? I'll be very grateful if you can help me we that.

     

    Paulien

  15. ...and the bit below in pdf_invoice.php

    What can I change or delete in order to stop this code messing around with my image size? I am using a 72 DPI jpeg.

     

    Thanks,

    Tom

    in the file shown above, the full line 104 looks like this (taken from a live shop):

    $this->$image_function(PDF_INVOICE_IMAGE,7,10,($size[0]*0.3),($size[1]*0.3),'', FILENAME_DEFAULT);

    in the above example, the constant PDF_INV_IMG_CORRECTION has been replaced by actual figures 0.3. try different figures to suit your need.

     

    Ken

  16. Hi,

     

    I have been using this for months now and its a great contribution. Thank you for the effort that has gone into this!

     

    I am having one issue, and let me explain what I have done.

     

    I have removed all references to product stock in both Product Info and Application Top, so that out of stock items will display. The problem is that my Title is not being displayed for the products that are out of stock. The in stock items have the title no problem. The description and keyword tags are working fine.

     

    Anyone else tried this with success? If more details are required please let me know.

     

    Johan

    logically (and normally), stock level has nothing to do with the title tag, unless you have done some extraordinary (but wrongly or unnecessary) changes to your site. if you want to show out of stock products you would only need to set check stock level to false in admin rather than being keen to show you are capable to spend time changing code in the two files of application top and product info.

    Ken

  17. its entirely up to you to decide what is more important. if you are selling unique products then product name may be important, otherwise visitor may be searching for more general keywords, ie, category names. i dont believe the so called seo expert, there is only seo common sense. or if you have money you can surely bribe google to get notice and in this case you are the expert otherwise whatever you do would get google notice is everyone' guess. in googles eye money is not evil as it declares it does not do evil.

     

    Ken

    ps. the contribution has some changes ever since along with the late chemo USURL but havent got the time to put them together and make it available.

     

    Would it work to change this around in application_top?

     

    //add category name to page title

    if (strlen($categories['categories_name'])>1) $header_tags[title_tag] = $categories['categories_name'] . $header_tags[title_tag];

     

    to this

     

    //add category name to page title

    if (strlen($categories['categories_name'])>1) $header_tags[title_tag] = $header_tags[title_tag] . $categories['categories_name'];

     

     

    This changes product first and then category

     

     

    I am not certain if this would be the only change necessary, or if other things also needs changing... it appears to work in that it puts product first and category second. SEO experts say to place the most relevant keywords at the front. My most relevant keywords are the product and then the category.

  18. Hi There, I went thru the instructions twice but I don't think it's working.

    I the admin module, I added some text to product meta tags and category meta tags.

    The URL looks as it did before (for example .../product_info.php?cPath=10&products_id=104).

    Any ideas? Thanks!

    this contribution does NOT change urls. if you also want to change urls, you should install ultimate seo urls by chemo updated by Jack, in addition to this contribution.

    ken

×
×
  • Create New...