Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

gaus

Members
  • Content count

    13
  • Joined

  • Last visited

About gaus

  • Birthday 01/01/1971

Profile Information

  1. Jack, I have added the code. Nothing is displayed besides the words, 'Product name' and 'Title name'. This is why I am thinking that there is a problem with the database query/variable assignment. I'm no PHP wizard, but that's my feeling after trying to echo these variables from various points in the code. I have re-installed, re-uploaded categories.php, looked through this forum, ran fill tags, looked at my database through phpMyAdmin and from there I can see the fields in products_description are populated with the info I entered via the Admin/Catalog interface when adding products. This is a heavily modifed site running STS which was installed with the STS and HTC combined contrib. I have double-checked all the find/replace instructions and cannot find any discrepancies. Here is the code* that is right above the code you have had me add, this is the database query which should end up in having the variables $the_product_info['products_head_title_tag'] echoed. Strangely, nothing is displayed except the <title> of the page does display the exact title phrase that I have configured in the header_tags.php file (includes/languages/english/header_tags.php). I have a good understanding of the HT** switches, etc.. and have configured the setup to work to the best of my understanding but no luck. Code* (includes/header_tags.php): // PRODUCT_INFO.PHP case ( strstr($_SERVER['PHP_SELF'],FILENAME_PRODUCT_INFO) or strstr($PHP_SELF,FILENAME_PRODUCT_INFO) ): // $the_product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, pd.products_head_title_tag, pd.products_head_keywords_tag, pd.products_head_desc_tag, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . $HTTP_GET_VARS['products_id'] . "' and pd.products_id = '" . $HTTP_GET_VARS['products_id'] . "'"); $the_product_info_query = tep_db_query("select pd.language_id, p.products_id, pd.products_name, pd.products_description, pd.products_head_title_tag, pd.products_head_keywords_tag, pd.products_head_desc_tag, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . $HTTP_GET_VARS['products_id'] . "' and pd.products_id = '" . $HTTP_GET_VARS['products_id'] . "'" . " and pd.language_id ='" . $languages_id . "'"); I have uncommented the query code block on top, commenting instead the code block on the bottom to see if that had any effect and it did not. Not sure why there two blocks of query code, of which one is commented out. Thanks again, gaus here's a link to a product info page within my site if that helps out: http://www.choicepetproducts.com/product_i...products_id=485
  2. Jack, My problem is that I have been trying to have the product name show up in the title of the product info page for specific products. I added the line above and no Title, Desc or KWords were shown. However, in the catalog admin, where I enter the Title, Desc and KWs, everything seems to function. The database is written to, changes to these records are kept upon update. It is only this small problem that I seem to be having, all other page titles are set with generic defaults and come up just fine. I am assuming that the product_info.php file is not creating the array $tags_array properly from its database query or perhaps is not making the query at all as those variables ($tags_array['title'], etc..) show up empty no matter where in code I try and echo them from. Do you have any suggestions for me? thank you, gaus
  3. I have solved this problem at my store. I have added the 'add read more...' hack to this contrib. as well and my code is so heavily modified that all I can do is show you how I got it to work using the code I have. Inside 'product_listing.php' I have some code that now looks like this: // Products Description Hack begins //Add a read more link to the products description case 'PRODUCT_LIST_DESCRIPTION': $lc_text = '<div align="justify"><span class="mod">' . osc_trunc_string(strip_tags($listing['products_description'], ''), PRODUCT_LIST_DESCRIPTION_LENGTH) . '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '"><b>' . osc_suite_more(strip_tags($listing['products_description'], ''), PRODUCT_LIST_DESCRIPTION_LENGTH) . '</b></a></span></div>'; $col_to_span = sizeof($column_list)-1; if (PRODUCT_LIST_IMAGE > 0) { $col_to_span -= 1; } $lc_params = 'colspan="' . $col_to_span . '" '; break; // Products Description Hack ends I got this code from a post inside this very forum I believe. It was missing from the 'read more' contribution. The only difference between how it was posted and what is above is that I added the <span class="mod"> tag and, later in the same block of code, </span>. I then added a class called '.mod' to my general stylesheet.css file. The '.mod' class shapes up the product description snippet text to appear as I like. Here it is just for the sake of it (within stylesheet.css): /* mod is a hack to reposition/format product description in product listing */ .mod { display:block; position:relative; top:-40px; color: black; font-weight:normal; padding-right:180px; padding-left:10px; } I am using MS2.2 and STS 4.4 and seems to work fine. You can see here: http://www.choicepetproducts.com/index.php?cPath=68 If anyone sees any probs with this hack, please let me and others know. I'm simply posting to try and be of assistance as I have been 'assisted' many, many times by the kind folks participating in this forum/project. gaus
  4. gaus

    [Contribution] STS v4

    Hello, Haven't got any replies to this problem yet. Seeking to change infoboxes so that the header of each box links to the page instead of using the $right_arrow. Tried manipulating $headertext but since $headertext contains <td> tags, I cannot simply add a <a> tag around it as the resulting HTML is not formed correctly. I have it now so that the infobox headings link to files such as shopping_cart.php, the links show up in the infobox heading as, for example, 'shopping_cart'. My goal is to get the links showing up like 'Shopping Cart', linking to shopping_cart.php. Again any help much appreciated. gaus
  5. gaus

    [Contribution] STS v4

    Still having problems with this. The problem with my above code is that the resulting HTML is improperly formed (not to Firefox though). I end up with something like <a href="shopping_cart.php"><td width="200">Shopping Cart</td></a>. From what I can tell, the name of the box is held in an the array of $contents[][]['form'] somehow but I do not know how to form the code that can retrieve it. (inside the file boxes.php). Does anyone know how to extract the name of a box (from within $headertext) w/o getting the resulting HTML (the <td> ... </td> tags)? Thanks, gaus
  6. gaus

    [Contribution] STS v4

    I have created a solution to my query above. It seems to work well and I would like to know if anyone can see any reason why it might not be a good solution. Here's what I did: Modified: boxes.php to include a line: $template = $sts->infobox_header_template."\n".$template; // Add header before the content. Header can be empty. $template = str_replace('$headertext', $sts->infobox_headertext, $template); $template = str_replace('$right_arrow', $sts->infobox_right_arrow, $template); $template = str_replace('$content', $content, $template); $template = str_replace('$my_link', $boxname, $template); <<-- This is the line I added Modified infobox.php.html line that builds the infobox head to: <td class="infoBoxHeading" width="200"><?php echo '<a href="' . '$my_link' . '.php">' . '$headertext' . '</a>'; ?></td> Now the infobox headline text links to the correct page, ie: Shopping Cart box links to shopping_cart.php BTW: I am not using any boxes that should not link anywhere. gaus ps. I am fairly new to writing PHP, and so I am slightly hesitant to trust any of my own PHP code modifications.
  7. gaus

    [Contribution] STS v4

    Hello, I am using STS 4.4 and have enabled templates for infoboxes. I would like to turn the $headertext of each box into a link that links to the same place as the $right_arrow function links. I've tried changing a specific line in my template file (infobox.php.html) to something like this: <td class="infoBoxHeading" width="200"><?php echo '<a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '.php">' . '$headertext' . '</a>'; ?></td> Which creates a link to shopping_cart.php out of the heading of every infobox (predictably). What (variable?) do I put in place of 'FILENAME_SHOPPING_CART' to get the link to link to the appropriate box page.php? I've tried $headertext, $boxname, $title .. I have been looking on this forum for a few hours, saw one post ask the same question but could not find a reply. Any help much appreciated. gaus
  8. gaus

    [Contribution] STS v4

    Uninstalled module, re-installed, DB was amended and everything works now. Simple enough. gaus
  9. gaus

    [Contribution] STS v4

    Hello, I am working on a site that was built from the most current vers. of OSC with the STS 4.3.3 contribution installed, working perfectly with my own custom-built templates inside a folder called 'full' within includes/sts_templates. I just attempted to upgrade to STS vers. 4.4. I had a problem (below) and found within this forum a fix for 2 'bugs'. The one to application.top and the one to the sts_default.php (removing brackets). I applied both fixes. Here's what I get, applying those fixes did not change anything: Upon loading the store/index.php file into browser, at the very top: Template file does not exist: [MODULE_STS_TEMPLATES_FOLDERfull/index.content.php.html] The template displayed is the standard, unmodified/non-custom template. I noticed that in my ADMIN of the STS default module there is now a field for a 'basefolder'. This field appears without a label above it and its text field/input box is blank. Seems like an addition to my DB should have been made to accomodate this new parameter but I made no changes to my DB according to the upgrade instructions I followed. Did I miss something? Any help would be appreciated. I guess I could always just revert to my previous vers. but I would very much like to keep current on all future upgrades of this excellent contribution. Thanks, gaus
×