Stealth1 Posted February 18, 2010 Share Posted February 18, 2010 This hasn't really bugged me until now as I am trying to optimize my website and this seems like it will pose a problem. When you create an item in a category the product is linked to there. Now if you need that product in multiple categories you can use the "copy to" and then "link" option. The problem with this is that if someone clicks on the product in the category that you added the product to with the "copy to" option it will direct back to the directory where it was originally listed. So your customer is taken from the section they were browsing and sent to another section of your site. Now you can avoid this by using the "duplicate product" option but then this will list the product multiple times when you view products by manufacturer. Just to clarify: If I put a product in home -> stuff and then link it into home -> new things and a customer is in the "new things" section and clicks that product they are taken to the home -> stuff when viewing the product So I need help in finding a solution for this, hoping it exists and I just couldn't find it with my searches. I need to be able to have each product be its own in the different categories but if its the exact same product I don't want it to be listed multiple times in the manufacturers view products section. Link to comment Share on other sites More sharing options...
♥bruyndoncx Posted February 18, 2010 Share Posted February 18, 2010 you'll need to have the cPath added to the url when you call the product, but then I'm not even sure if you need to make other changes in breadcrumb functions or catagories tree to have the desired result. Depends probably on what else you have customized on your site too. You can try by adding the 'new things' cPath to the product_info.php call and see what gives ... KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt Link to comment Share on other sites More sharing options...
Stealth1 Posted February 19, 2010 Author Share Posted February 19, 2010 you'll need to have the cPath added to the url when you call the product, but then I'm not even sure if you need to make other changes in breadcrumb functions or catagories tree to have the desired result. Depends probably on what else you have customized on your site too. You can try by adding the 'new things' cPath to the product_info.php call and see what gives ... Thanks, that may have fixed things for me. I have SEO URLS 5 and it has the option to turn cpath on. I did so and it now maintains the correct location although it does make the URL's ugly now. The only issue with this is that KissMT still displays the original section info on the top of the browser where the product was initially added. Link to comment Share on other sites More sharing options...
♥bruyndoncx Posted February 19, 2010 Share Posted February 19, 2010 I wouldn't expect it any differently from a KISS system as it is supposed to be KISS = Keep It Simple and Stupid. I don't have KISS, but I would think it shouldn't be too hard to look at the last part of the cPath in the url and not fetch category_id from the database. KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt Link to comment Share on other sites More sharing options...
Stealth1 Posted February 19, 2010 Author Share Posted February 19, 2010 Yeah hopefully I can get that sorted out with FWR as it would be very helpful. Link to comment Share on other sites More sharing options...
Stealth1 Posted February 23, 2010 Author Share Posted February 23, 2010 I wouldn't expect it any differently from a KISS system as it is supposed to be KISS = Keep It Simple and Stupid. I don't have KISS, but I would think it shouldn't be too hard to look at the last part of the cPath in the url and not fetch category_id from the database. BTW do you think this would cause a problem with google seeing the pages as having the same META information since I believe the text on the top of the browser displayed is what is used for the KISSMT META information. If I have 1 product linked in 16 different categories it may report duplicate META because of this? Link to comment Share on other sites More sharing options...
Stealth1 Posted February 27, 2010 Author Share Posted February 27, 2010 Can anyone out there help me fix KissMT so it bases the META data on the category and product and doesn't base it on the initial section the product was created in. Link to comment Share on other sites More sharing options...
♥bruyndoncx Posted February 27, 2010 Share Posted February 27, 2010 Can you post the code that generated the meta tags ? KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt Link to comment Share on other sites More sharing options...
Stealth1 Posted March 1, 2010 Author Share Posted March 1, 2010 Can you post the code that generated the meta tags ? I am not sure where it is generated, I have KissMT R72. I am guessing its from this code? <?php /** * * KISS Dynamic SEO Meta Tags * KISS = (Keep It Simple Stupid!) * * @package KISS Meta Tags SEO v1.0 * @license http://www.opensource.org/licenses/gpl-2.0.php GNU Public License * @link http://www.fwrmedia.co.uk * @copyright Copyright 2008-2009 FWR Media * @author Robert Fisher, FWR Media, http://www.fwrmedia.co.uk * @lastdev $Author:: Rob $: Author of last commit * @lastmod $Date:: 2010-01-18 10:45:55 +0000 (Mon, 18 Jan 2010) $: Date of last commit * @version $Rev:: 59 $: Revision of last commit * @Id $Id:: product_info.php 59 2010-01-18 10:45:55Z Rob $: Full Details */ final class KissMT_Module extends KissMT_Modules { private $products_query; protected $noindex_follow = array(); public function __construct() { $this->products_query = "SELECT p.products_model, pd.products_name, pd.products_description, m.manufacturers_name FROM " . TABLE_PRODUCTS . " p INNER JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd ON pd.products_id = p.products_id AND pd.language_id = :languages_id LEFT JOIN " . TABLE_MANUFACTURERS . " m ON m.manufacturers_id = p.manufacturers_id WHERE p.products_id = :products_id"; } // end constructor public function process() { $this->get_value = $this->parsePath( $_GET['products_id'] ); $this->original_get = (int)$_GET['products_id']; $this->cache_name = $this->setCacheString( __FILE__, 'products_id', $this->original_get ); if ( false !== $this->retrieve( $this->cache_name ) ) { KissMT::init()->setCanonical( $this->checkCanonical( 'products_id' ) ); return; } $query_replacements = array( ':products_id' => (int)$this->get_value, ':languages_id' => (int)KissMT::init()->retrieve( 'languages_id' ) ); $query = str_replace( array_keys( $query_replacements ), array_values( $query_replacements ), $this->products_query ); $result = KissMT::init()->query( $query ); $product_results = tep_db_fetch_array( $result ); tep_db_free_result( $result ); $breadcrumb = array_flip( KissMT::init()->retrieve( 'breadcrumb' ) ); if ( array_key_exists( $product_results['products_model'], $breadcrumb ) ) { unset( $breadcrumb[$product_results['products_model']] ); } if ( array_key_exists( $product_results['products_name'], $breadcrumb ) ) { unset( $breadcrumb[$product_results['products_name']] ); } $breadcrumb = array_flip( $breadcrumb ); $leading_values = KissMT::init()->entities( trim( $product_results['products_name'] ), $decode = true ); if ( tep_not_null( $product_results['products_model'] ) ) { $leading_values .= '[-separator-]' . trim( $product_results['products_model'] ); } $leading_values .= '[-separator-]' . implode( '[-separator-]', $breadcrumb ); if ( tep_not_null( $product_results['manufacturers_name'] ) ) { $leading_values .= '[-separator-]' . sprintf( KISSMT_BRAND_TEXT, trim( $product_results['manufacturers_name'] ) ); } KissMT::init()->setCanonical( $this->checkCanonical( 'products_id' ) ); $this->parse( KissMT::init()->entities( $leading_values, $decode = true ), KissMT::init()->entities( $product_results['products_description'], $decode = true ) ); } } // End class ?> Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.