Jump to content

zrxRaver

Members
  • Content count

    3
  • Joined

  • Last visited

1 Follower

Profile Information

  1. zrxRaver

    Easy populate

    I could not find a solution for missing products_model so I made some simple code for it. In easypopulate.php after this code echo "Added $linecount records and closing file...<br><br> "; fclose($fp); fclose($infp); echo "You can download your split files in the Tools/Files under /catalog/temp/"; } put this // create unique temporarily products_model identifier from prefix '__' + products_id if($create_pmodels==1){ tep_db_query( "update " . TABLE_PRODUCTS . " p set p.products_model = CONCAT('__', p.products_id) where p.products_model = ''"); } if($delete_pmodels==1){ tep_db_query( "update " . TABLE_PRODUCTS . " p set p.products_model = '' where instr(p.products_model, '__') = 1"); } after this <INPUT TYPE="text" name="localfile" size="50"> <input type="submit" name="buttoninsert" value="Insert into db"> <br> </p> </div> </form> put this <table> <tr> <td colspan="2"> <FORM ENCTYPE="multipart/form-data" ACTION="easypopulate.php?create_pmodels=1" METHOD=POST> <p> <div align = "left"> <p><b>Temporarily Products_model</b></p> <input type="submit" name="Create" value="Create"> </div> </form> </td> <td valign="bottom"> <FORM ENCTYPE="multipart/form-data" ACTION="easypopulate.php?delete_pmodels=1" METHOD=POST> <input type="submit" name="Delete" value="Delete"> </div> </form> </td> </tr> </table> Now you have 2 extra buttons, Create and Delete. Before you make the csv file press Create, all missing products_model will be filled with a unique number made of 2 underscore's and the products_id. When you're done uploading, press the Delete button, all the temporarily products_model will be deleted, but only those with the double underscore prefix, so all your original products_model will be spared.
  2. I also got the following errror, Warning: main(includes/configure.php): failed to open stream: No such file or directory And many more files that could not been found with crontab. The problem is when you use php in CLI mode that it does not change the working directory like it does when you call the same index.php from a webbrowser. So before the line in index.php in the googlesitemap directory require_once('includes/configure.php'); add chdir('/root/to/your/shop/catalog/'); (replace '/root/to/your/shop/ to your absolute path on the webserver, (you can find it in configure.php at define('DIR_FS_CATALOG .....)) For me Cron works perfect now. Even Google likes my sitemap now. cu
×