Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #test area php run in console
- <?php
- error_reporting(E_ALL);
- ini_set('display_errors', 1);
- ini_set('max_execution_time', 420);
- ?>
- <?php
- require_once 'app/Mage.php';
- Mage::app();
- ?>
- <?php
- $copypasta = <<< EOC
- EOC;
- $skus = explode(PHP_EOL, $copypasta);
- foreach ($skus as $prod) {
- $asdf = Mage::getModel('catalog/product')->loadByAttribute('sku', $prod);
- if($asdf) {
- $asdf->save();
- echo $asdf->getSku() . " Updated #" . PHP_EOL;
- }
- else {echo $prod . " not exist <br/>";}
- }
- ?>
- physical_filename name sku storis entity_id model_name filename(model_name_Tearsheet.pdf)
- INSERT INTO `am_file` (`file_id`, `product_id`, `file_url`, `file_name`, `file_link`) VALUES (NULL, # entity_id #, # phsyical_filename_on_media #, # front-facing-name.pdf #, ##);
- INSERT INTO `am_file_store_customer_group` (`id`, `store_id`, `file_id`, `customer_group_id`, `is_active`) VALUES (NULL, #0#, # AUTO_INCREMENT_ID_FROM_SQL_STATEMENT_ABOVE #, #-1#, #1#);
- INSERT INTO `am_file_store` (`id`, `file_id`, `store_id`, `label`, `visible`, `position`, `use_default_label`, `use_default_visible`, `show_ordered`, `use_default_show_ordered`, `use_default_customer_group`) VALUES (NULL, # AUTO_INCREMENT_ID_FROM_SQL_STATEMENT_ABOVE #, #0#, #Tearsheet#, #1#, #0#, #0#, #0#, #0#, #0#, #0#);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement