Drupal

Migrating an OSCommerce shop to Drupal ubercart

Here are my notes from migrating an OSCommerce installation to a Drupal ubercart system.

Firstly dump all the products with their names and ids from the OScommerce database. Then import this data with the node import module. I've imported the id field into the description because at this point in time I couldn't figure where the sku was stored.

Drupal - delete content items of a particular type

  • Put this as a file into your drupal root directory
  • Log on as an admin
  • Call the script from a webbrowser

 
<?php
require_once './includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);

$type="product";

$query= db_query("SELECT nid FROM {node} AS n WHERE type = '%s'",$type);

while ($row = db_fetch_object($query)) {
  print_r($row);
  node_delete($row->nid);
}
?>

 

Syndicate content