You are here:  » Product mapping, how to find product not mapped

Support Forum



Product mapping, how to find product not mapped

Submitted by tisbris on Sat, 2011-01-15 09:48 in

Hi David

My site contains about 5000 products and they all needs to mapped because of the way the merchant is labeling there products.

The marchent don't change these product names afterwards, so it is only big job in the beginning, but when the mapping is done, but then the chanllenge is to monitor which products hasn't been mapped (new products).

Do you have an idea how to monitor which product which hasn't been mapped, so i don't need to control all categories for new unmapped products?

thx

//Brian

Submitted by support on Sat, 2011-01-15 11:16

Hi Brian,

Have a go with the following - copy the code below into a new text file and save as unmapped.php, then upload to and browse from the /admin/ folder of your installation...

unmapped.php

<?php
  
require("../includes/common.php");
  
$admin_checkPassword TRUE;
  require(
"../includes/admin.php");
  require(
"admin_header.php");
  require(
"admin_menu.php");
  print 
"<h2>Unmapped Products</h2>";
  
$sql "SELECT name FROM `".$config_databaseTablePrefix."products`
           WHERE name NOT IN (SELECT name FROM `"
.$config_databaseTablePrefix."productsmap`)";
  
$link = @mysql_connect($config_databaseServer,$config_databaseUsername,$config_databasePassword);
  @
mysql_select_db($config_databaseName,$link);
  
$result mysql_query($sql,$link);
  if (
mysql_num_rows($result))
  {
    print 
"<p>";
    print 
"<textarea cols='80' rows='30'>";
    while(
$product mysql_fetch_array($result,MYSQL_ASSOC))
    {
      print 
htmlentities($product["name"],ENT_QUOTES,$config_charset)."\n";
    }
    print 
"</textarea>";
    print 
"</p>";
  }
  else
  {
    print 
"<p>There are no unmapped products to display.</p>";
  }
  require(
"admin_footer.php");
?>

Cheers,
David.
--
PriceTapestry.com

Submitted by tisbris on Sat, 2011-01-15 12:01

Hi David

Yes this list all unmapped products...

Thank you very much.

//Brian