Jump to content

rseigel

Members
  • Posts

    145
  • Joined

  • Last visited

  • Days Won

    1

rseigel last won the day on September 21 2022

rseigel had the most liked content!

About rseigel

  • Birthday 10/13/1967

Profile Information

  • Location
    Ottawa, ON
  • Activity
    User/Merchant

Recent Profile Visitors

3,218,729 profile views

rseigel's Achievements

Newbie

Newbie (1/14)

27

Reputation

  1. Ooops....forgot to delete cache/class_index.php Works perfect now. Thanks.
  2. Thanks very much for the help. You're absolutely correct about not touching core files. I knew better - was just looking for a shortcut. For some reason your code still doesn't work for combinations. Still getting "Field ean13 is not valid". There has to be another check somewhere for the EAN13 field in the combinations.
  3. BTW....I've already tried changing it in classes/Combination.php with no luck. It still gives the error: Field ean13 is not valid
  4. Hi all, I'm using my EAN13 field to insert the Amazon ASIN number instead. I accomplished this by changing line 279 in classes/Product.php from: 'ean13' => array('type' => self::TYPE_STRING, 'validate' => 'isean13', 'size' => 13), to: 'ean13' => array('type' => self::TYPE_STRING, 'validate' => 'isString', 'size' => 10), So far so good. Now I also need to be able to reuse the EAN13 field in COmbinations for the same purpose (in this case sizes). I can't seem to locate the file (I can't find another instance of validation in Product.php so I have to assume it's in another file) that contains the validation for the EAN13 field in combinations. Does anyone know where I should look? Thanks, Ron
  5. Whew....I got it! If you compare these two lines: $sql2 = "SELECT p.upc AS 'Product-id', '3' AS 'Product-id-type', '11' AS 'Item-condition', IFNULL( p.price - sp.reduction, p.price ) AS 'Price', p.supplier_reference as 'SKU', sa.quantity as 'Quantity', '' as 'Item-Note', '2' as 'Shipping-time', 'N' as 'Will-ship-internationally', 'N' as 'Expedited-shipping', '7.95' as 'Standard-shipping-charge', '' as 'Expedited-shipping-charge', '' as 'International-shipping-charge', id_product and $headers = array('Product-id', 'Product-id-type', 'Item-condition', 'Price', 'SKU', 'Quantity', 'Item-Note', 'Shipping-time', 'Will-ship-internationally', 'Expedited-shipping', 'Standard-shipping-charge', 'International-shipping-charge', 'URL', 'IMAGE_URL'); you can see that 'Expedited-shipping-charge' was left out of the second one, causing the shift. Whew.....thanks a bazillion. Money was sent a while ago. I'm kinda stoked I was able to work that last little bug out myself.
  6. Ok..... $headers = array('Product-id', 'Product-id-type', 'Item-condition', 'Price', 'SKU', 'Quantity', 'Item-Note', 'Shipping-time', 'Will-ship-internationally', 'Expedited-shipping', 'Standard-shipping-charge', 'International-shipping-charge', 'URL', 'IMAGE_URL'); $num_fields = 14; $csv_filename = dirname(__FILE__)."/a1Outlet_PURGE.txt"; $fp = fopen($csv_filename, 'w+'); if ($fp && $result) { fputcsv($fp, $headers, $delimiter = ' '); foreach ($result as $product) { unset($product['id_product']); fputcsv($fp, array_values($product), $delimiter = ' '); } } This is exactly as I have it. It takes product_id out of the header just fine. When it writes the csv (below the header) though it shifts everything over so the URL column is empty, the URL values are in the IMAGE_URL column, and the IMAGE_URL values are past the headers in the next column. Does that make sense?
  7. Grrrr.....I'm trying to get rid of the id_product column in the CSV file and just can't get it to work. Any ideas?
  8. Nevermind....I'm an idiot (that can't read apparently). I missed the "You might need to update the database table prefix, since I added ps_ to them." As soon as I removed the ps_ everything worked fine. Now I just need that email addy.
  9. Wow! Couldn't resist fixing my bad habits could ya? Much appreciated. I'm getting the following error: - - - SHOPPING CREATION STARTED - - - bool(false) - - - SHOPPING FILE CREATION ENDED - - - When I narrowed it down it appears that this line, var_dump ($result); is causing the problem. It stops executing there and doesn't generate the CSV. Can you help me fix that? Also, PM me your paypal email so I can keep up my end of the bargain once it's up and running.
  10. I should also mention that I really need this ASAP. So if any awesome dev out there is willing to help......
  11. I have been struggling trying to get the base image URL and the product URL so I could stuff them into a csv file. Here's the php file I'm using: mysql_connect("localhost", "xxxxxxxxx", "xxxxxxxx") or die(mysql_error()); mysql_select_db("xxxxxxxx") or die(mysql_error()); mysql_query("DROP TABLE IF EXISTS tmp_price_compare") or die(mysql_error()); mysql_query("CREATE TABLE IF NOT EXISTS tmp_price_compare ( supplier_reference varchar(32) DEFAULT NULL, quantity int(10) NOT NULL DEFAULT '0', price decimal(20,6) NOT NULL DEFAULT '0.000000', wholesale_price decimal(20,6) NOT NULL DEFAULT '0.000000' ) ENGINE=InnoDB DEFAULT CHARSET=utf8") or die(mysql_error()); mysql_query("CREATE INDEX indx_tmp ON tmp_price_compare (supplier_reference)") or die(mysql_error()); echo " - - - SHOPPING CREATION STARTED - - - </br>\n"; $result = mysql_query("SELECT p.upc AS 'Product-id', '3' AS 'Product-id-type', '11' AS 'Item-condition', IFNULL( p.price - sp.reduction, p.price ) AS 'Price', p.supplier_reference as 'SKU', sa.quantity as 'Quantity', '' as 'Item-Note', '2' as 'Shipping-time', 'N' as 'Will-ship-internationally', 'N' as 'Expedited-shipping', '7.95' as 'Standard-shipping-charge', '' as 'Expedited-shipping-charge', '' as 'International-shipping-charge' FROM product p LEFT JOIN specific_price sp USING ( id_product ) JOIN stock_available sa USING ( id_product ) WHERE p.upc > ''"); $num_fields = mysql_num_fields($result); $headers = array(); for ($i = 0; $i < $num_fields; $i++) { $headers[] = mysql_field_name($result , $i); } $csv_filename = "a1Outlet_PURGE.txt"; $fp = fopen($csv_filename, 'w+'); if ($fp && $result) { fputcsv($fp, $headers, $delimiter = ' '); while ($row = mysql_fetch_row($result)) { fputcsv($fp, array_values($row), $delimiter = ' '); } } echo " - - - SHOPPING FILE CREATION ENDED - - - </br>\n"; Sooooo....I simply need to know what code I need to put to get those two things for each product and where to put it. I'm willing to pay a quick $30US to the first person that can solve this little problem for me. I'd love if it was built into the SELECT somehow but in the end I just want it to work. Feel free to send it to me via PM if you don't want to post it here. You'll have to trust me on the $30 but I can assure you that as soon as I confirm it works I'll send you the money via paypal ASAP. This should be simple for the caliber of PS developers that are here. BTW....this is the entire script so any calls that need to be made to PS need to be made here. It's a standalone PHP script that, at this point, only connects to PS via the database.
  12. Could you elaborate a bit on "From a php file, use $this->context->link and the same methods and args"? I'm essentially trying to generate product links (to save in a CSV file) and my head hurts from trying to figure this out. I have the product id - now I want to use that in a loop to generate the URL (and product cover image URL as well). Thanks.
  13. Wicked. Thanks for that. Now, I'm a bit confused. How do I use that on the fly in a loop (the loop part I have - no issues there). Basically, I want to get the URL for each product as I loop through them. I can simply add it to my CSV file after the SELECT has grabbed everything else and written the CSV file. So, I'm looking to look each main image URL up by SKU (or ID or whatever). Does that make sense?
  14. I've tried to figure this out (found a few kinda sorta threads that didn't quite get me there) for a while now. What I need to do is, using php, get the URL of the main picture for a given product. I'm using 1.5.3.1. Does anyone have the snippet that would get that? This is for a custom script that I use to create product feeds for different marketplace sites. TIA Ron
  15. Should be up and running soon....... Fingers crossed.
×
×
  • Create New...