Page 53 of 58 FirstFirst ... 3435152535455 ... LastLast
Results 521 to 530 of 577
  1. #521
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,347
    Plugin Contributions
    94

    Default Re: Simple Instructions for Import

    Quote Originally Posted by mcqueeneycoins View Post
    Ah, bummer! Is it something I could update via sql command (and, if so, what would that command look like)? I basically want to reset the date added on all products to match the launch date of the site, when it's ready. Thanks!
    To update all products' date-added to the current date:
    Code:
    UPDATE products SET products_date_added = now();
    Note that the above query will work in your Zen Cart admin's Tools / Install SQL Patches and, if your DB_PREFIX is an empty string, in phpMyAdmin.

    If you're running the query in phpMyAdmin and you use a DB_PREFIX (e.g. 'zen_'), you'd use
    Code:
    UPDATE zen_products SET products_date_added = now();

  2. #522
    Join Date
    Jan 2008
    Posts
    144
    Plugin Contributions
    0

    Default Re: Simple Instructions for Import

    Quote Originally Posted by lat9 View Post
    To update all products' date-added to the current date:
    Code:
    UPDATE products SET products_date_added = now();
    Note that the above query will work in your Zen Cart admin's Tools / Install SQL Patches and, if your DB_PREFIX is an empty string, in phpMyAdmin.

    If you're running the query in phpMyAdmin and you use a DB_PREFIX (e.g. 'zen_'), you'd use
    Code:
    UPDATE zen_products SET products_date_added = now();
    Works perfectly--thank you as always lat9! Happy holidays!

  3. #523
    Join Date
    Jun 2007
    Location
    Bronx, New York, United States
    Posts
    681
    Plugin Contributions
    8

    Default Re: Simple Instructions for Import

    Is there a guide or a set of best practices for when it comes to creating your own handler for importing?

    In my case, I created a set of product types that each reads from a different table. How would I direct DBIO to import data received under one handler and send it to the necessary table?

  4. #524
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,347
    Plugin Contributions
    94

    Default Re: Simple Instructions for Import

    Quote Originally Posted by retched View Post
    Is there a guide or a set of best practices for when it comes to creating your own handler for importing?

    In my case, I created a set of product types that each reads from a different table. How would I direct DBIO to import data received under one handler and send it to the necessary table?
    You'd set the single handler's setHandlerConfiguration method to identify all the potential, albeit product-type-specific, tables that could be used.

    On an import, I'd suggest using the handler's importCheckKeyValue method to determine which 'type' of product is being imported for the current CSV record, saving that in a method-specific class parameter which is subsequently used by the handler's importProcessField. That method would interrogate the product-type being dealt with so that it's aware of which of the possibly multiple product fields are to be used.

  5. #525
    Join Date
    Jun 2007
    Location
    Bronx, New York, United States
    Posts
    681
    Plugin Contributions
    8

    Default Re: Simple Instructions for Import

    Quote Originally Posted by lat9 View Post
    You'd set the single handler's setHandlerConfiguration method to identify all the potential, albeit product-type-specific, tables that could be used.

    On an import, I'd suggest using the handler's importCheckKeyValue method to determine which 'type' of product is being imported for the current CSV record, saving that in a method-specific class parameter which is subsequently used by the handler's importProcessField. That method would interrogate the product-type being dealt with so that it's aware of which of the possibly multiple product fields are to be used.
    So is there no need to make a separate handler for each additional type?

  6. #526
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,347
    Plugin Contributions
    94

    Default Re: Simple Instructions for Import

    Quote Originally Posted by retched View Post
    So is there no need to make a separate handler for each additional type?
    It's up to you, but I think that you could do a single version that manipulates a product based on its product-type.

  7. #527
    Join Date
    Jun 2007
    Location
    Bronx, New York, United States
    Posts
    681
    Plugin Contributions
    8

    Default Re: Simple Instructions for Import

    Quote Originally Posted by lat9 View Post
    It's up to you, but I think that you could do a single version that manipulates a product based on its product-type.
    If fields are missing off the CSV import will they just be skipped and ignored?

  8. #528
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,347
    Plugin Contributions
    94

    Default Re: Simple Instructions for Import

    Quote Originally Posted by retched View Post
    If fields are missing off the CSV import will they just be skipped and ignored?
    If, by "missing", you mean that the associated column is not present, the answer is "Yes".

    If a column is present, but the value is an empty string, that value will be set for the 'row'.

  9. #529
    Join Date
    Jun 2007
    Location
    Bronx, New York, United States
    Posts
    681
    Plugin Contributions
    8

    Default Re: Simple Instructions for Import

    Quote Originally Posted by lat9 View Post
    If, by "missing", you mean that the associated column is not present, the answer is "Yes".

    If a column is present, but the value is an empty string, that value will be set for the 'row'.
    Awesome. One final question, is there a way to get DBIO to work together with POSM as far as setting the stock levels of the attributes? I tried to read into the table created by POSM, and it's returning a hash field of some kind so I don't know how others managed to get it to work.

  10. #530
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,347
    Plugin Contributions
    94

    Default Re: Simple Instructions for Import

    Quote Originally Posted by retched View Post
    Awesome. One final question, is there a way to get DBIO to work together with POSM as far as setting the stock levels of the attributes? I tried to read into the table created by POSM, and it's returning a hash field of some kind so I don't know how others managed to get it to work.
    For now, you'll need to 'purchase' the now-free version of POSM 5.0.0 (https://vinosdefrutastropicales.com/...products_id=46). That includes a set of DbIo handlers.

    I'll be incorporating those, now that POSM's in-core, in a subsequent release of DbIo.

 

 
Page 53 of 58 FirstFirst ... 3435152535455 ... LastLast

Similar Threads

  1. Support Thread for CKEditor Plugin
    By DivaVocals in forum Addon Admin Tools
    Replies: 213
    Last Post: 18 Nov 2024, 04:17 AM
  2. Back to Top Plugin [Support Thread]
    By picaflor-azul in forum All Other Contributions/Addons
    Replies: 31
    Last Post: 6 Feb 2016, 10:52 PM
  3. v151 Plug 'n' Pay plugin [Support Thread]
    By KetchRescue in forum Addon Payment Modules
    Replies: 5
    Last Post: 28 Nov 2015, 04:56 AM
  4. Justuno Plugin [Support Thread]
    By JustunoApp in forum All Other Contributions/Addons
    Replies: 8
    Last Post: 24 May 2015, 11:00 PM
  5. VendingBox Plugin Support Thread
    By vb_support in forum All Other Contributions/Addons
    Replies: 31
    Last Post: 10 Feb 2013, 07:24 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR