Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Amphitryon

Archived
  • Posts

    12
  • Joined

  • Last visited

Everything posted by Amphitryon

  1. I have posted the contribution to add the "read more" link here: http://www.oscommerce.com/community/contributions,1375 If you want to add a read more link to the product_listing.php page, then change // Products Description Hack begins case 'PRODUCT_LIST_DESCRIPTION': $lc_text = ' ' . osc_trunc_string(strip_tags($listing['products_description'], '<a><b><em><font><i><s><span><strong><sub><sup><u>'), PRODUCT_LIST_DESCRIPTION_LENGTH) . ' '; $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 and replace it with // Products Description Hack begins //Add a read more link to the products description case 'PRODUCT_LIST_DESCRIPTION': $lc_text = '<div align=justify>' . 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></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 Regards, Amphitryon
  2. I have solved the script and will post it with the contributions here: http://www.oscommerce.com/community/contributions,1375 ;)
  3. Hi, I have installed the Product Listing which works very fine. But I want to add a link "more..." that brings to the product page. I have changed the general.php file to this: // ################### Products Description Hack begins ############## // // grabs a length from a string, but goes back to the last space if it cut into // the middle of a string. If the string is longer than that, cut, then add '...' // to the end of the string, if the $more == 1 function osc_trunc_string($str="",$len=150,$more=1) { if ($str=="") return $str; if (is_array($str)) return $str; $str = trim($str); // if it's les than the size given, then return it if (strlen($str) <= $len) return $str; // else get that size of text $str = substr($str,0,$len); // backtrack to the end of a word if ($str != "") { // check to see if there are any spaces left if (!substr_count($str," ")) { if ($more) $str .= $lien; $lien= '... <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $product_description['products_id']) . '"><b>' . TEXT_PRODUCT_DESCRIPTION_MORE . '</b></a>'; return $str; } // backtrack while(strlen($str) && ($str[strlen($str)-1] != " ")) { $str = substr($str,0,-1); } $str = substr($str,0,-1); if ($more) $str .= $lien; $lien= '... <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $product_description['products_id']) . '"><b>' . TEXT_PRODUCT_DESCRIPTION_MORE . '</b></a>'; } return $str . ' ' . $lien; } // ########### Products Description Hack ends ############# The text in every languages shows, the link too, but the ID product doesn't. How can I have the ID product to show in the URL so that the link may work ? Any idea ? :'(
  4. The problem has been solved. I have updated my OsCommerce version to Ms-2.2. Thank you very much. :P
  5. In the boutique, I got the following error message: :'( ??????
  6. I have moved the strings of admin/includes/database_tables.php to admin/includes/application_top.php and that of includes/database_tables.php to includes/application_top.php. The left column of the admin panel now shows this: None of the links are working due to the termination defined in the application_top.php files. When I add the *.php to the files defined, I got the following error message. The problem comes from the faqdesk in the admin/includes/boxes where the strings are: But I don't know how to correct this. Any idea ? :'(
  7. I have installed the FAQDesk.v1.01.0.zip module. In the install.txt file, there are fields to add in the two database_tables.php files, but I don't have such files neither in the admin/includes neither in the includes. Consequently, I have created those files and have inserted the strings. When running the faqdesk from my admin panel, I got the following error message: Any idea ? :'(
  8. I could manage to make the script work, but I had to proceed little corrections. First of all, don't copy and paste the script but rigorously follow the step by step instructions. Then add the following lines to the application_top.php In the catalog/admin/includes folder: In the catalog/includes folder: Then set the permission of the mainpage.php in the catalog/includes/languages/english/ folder to 666 for the mainpage to be writable. _________________ Some modifications should be made on the mainpage to write the text in English and any other language at once with every languages in one single page. As the script is set, we have to load once in English and write the mainpage in English, then change the admin language to be able to write the text in the other language. If not written in every languages, the mainpage won't be shown at all.
×
×
  • Create New...