Jump to content

TweetClean

Members
  • Posts

    4
  • Joined

  • Last visited

Profile Information

  • Location
    Phoenix, AZ
  • Activity
    Web development agency

TweetClean's Achievements

Newbie

Newbie (1/14)

1

Reputation

  1. Here is a stand alone utility I wrote. It actually will also clean up any orphan foreign key entries that may be left from poor product management. I use this on Prestashop 1.4.9 <?php ini_set('max_execution_time', 1800); ini_set('max_input_time', 1800); ini_set('memory_limit', '1536M'); set_time_limit(1800); define('_DB_NAME_', 'yourdatabasename'); define('_DB_SERVER_', 'localhost'); define('_DB_USER_', 'yourusername'); define('_DB_PASSWD_', 'yourpassword'); /* Delete All Products for a Manufacturer */ $db_handle = mysql_connect(_DB_SERVER_, _DB_USER_, _DB_PASSWD_); $db_found = mysql_select_db(_DB_NAME_, $db_handle); //Put your manufacturer ID here $current_manufacturer = 8; $deletesql = "DELETE FROM ps_product WHERE id_manufacturer=".$current_manufacturer; $deleteresult = mysql_query($deletesql); print($deleteresult." product entries deleted<br>"); $deletesql = " DELETE FROM ps_product_attribute WHERE id_product NOT IN (SELECT p.id_product FROM ps_product p) "; $deleteresult = mysql_query($deletesql); print($deleteresult." product attributes deleted<br>"); $deletesql = " DELETE FROM ps_product_sale WHERE id_product NOT IN (SELECT p.id_product FROM ps_product p) "; $deleteresult = mysql_query($deletesql); print($deleteresult." product sales deleted<br>"); $deletesql = " DELETE FROM ps_product_lang WHERE id_product NOT IN (SELECT p.id_product FROM ps_product p) "; $deleteresult = mysql_query($deletesql); print($deleteresult." product language entries deleted<br>"); $deletesql = " DELETE FROM ps_category_product WHERE id_product NOT IN (SELECT p.id_product FROM ps_product p) "; $deleteresult = mysql_query($deletesql); print($deleteresult." product category entries deleted<br>"); $deletesql = " DELETE FROM ps_image WHERE id_product NOT IN (SELECT p.id_product FROM ps_product p) "; $deleteresult = mysql_query($deletesql); print($deleteresult." product image entries deleted<br>"); $deletesql = " DELETE FROM ps_image_lang WHERE id_image NOT IN (SELECT p.id_image FROM ps_image p) "; $deleteresult = mysql_query($deletesql); print($deleteresult." product image language entries deleted<br>"); $deletesql = " DELETE FROM ps_product_attribute_combination WHERE id_product_attribute NOT IN (SELECT p.id_product_attribute FROM ps_product_attribute p) "; $deleteresult = mysql_query($deletesql); print($deleteresult." product product attribute entries deleted<br>"); $deletesql = " DELETE FROM ps_attribute_impact WHERE id_product NOT IN (SELECT p.id_product FROM ps_product p) "; $deleteresult = mysql_query($deletesql); print($deleteresult." product attribue impact entries deleted<br>"); $deletesql = " DELETE FROM ps_product_tag WHERE id_product NOT IN (SELECT p.id_product FROM ps_product p) "; $deleteresult = mysql_query($deletesql); print($deleteresult." product tag entries deleted<br>"); $deletesql = " DELETE FROM ps_tag WHERE id_tag NOT IN (SELECT p.id_tag FROM ps_product_tag p) "; $deleteresult = mysql_query($deletesql); print($deleteresult." product tag entries deleted<br>"); $deletesql = " DELETE FROM ps_feature_product WHERE id_product NOT IN (SELECT p.id_product FROM ps_product p) "; $deleteresult = mysql_query($deletesql); print($deleteresult." product feature entries deleted<br>"); $deletesql = " DELETE FROM ps_feature_value WHERE id_feature NOT IN (SELECT p.id_feature FROM ps_feature_product p) "; $deleteresult = mysql_query($deletesql); print($deleteresult." product feature value entries deleted<br>"); $deletesql = " DELETE FROM ps_feature_value_lang WHERE id_feature_value NOT IN (SELECT p.id_feature_value FROM ps_feature_value p) "; $deleteresult = mysql_query($deletesql); print($deleteresult." product feature value language entries deleted<br>"); echo "<br><br>Finished<br>"; mysql_close($db_handle); ?>
  2. Not sure what version of prestashop you are using, but I know there is a tool called Store Commander that does mass importing and updating of products to include images, combinations and features. It is pretty robust but I am not sure if they have upgraded their product to work with 1.5.x yet. We used it in a 1.4.x installation that we upgraded from 1.3.1 and were able to import 15,000 new products along with images in a few days. TweetClean
  3. I have a problem with all of the Freight services that come with the Fedex Carrier module distributed with version 1.2.6 of the module on a 1.4.9 prestashop install. If I enter a single item, the Fedex Freight calculates fine. If I add an additional item of the same product, all of the freight rates drop to $2.00. If I add two products, one item eac, the freight rates show up as $2.00. All of my zones are set for 10,000 pounds and 10,000 dollars, neither product comes anywhere near this value. Has anyone experienced this and have a fix for it? Bob Cristello mancavegoodies.com
  4. I have installed and configured the UPS module that comes with prestashop in a prestashop 1.4.9 install. There are no Freight services contained for UPS in the UPS module. Can someone please suggest a module that will allow me to give shipping estimates and allow for UPS Freight to be selected during the checkout process. Thanks in advance. Bob Cristello
×
×
  • Create New...