Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2009
    Location
    Greeneville, TN USA
    Posts
    51
    Plugin Contributions
    0

    Default v1.5.7d Adding Products from vendor API

    Working on a new site. As part of that I've made a new admin menu item that allows the user to enter a vendor SKU or a manufacturer's part number and use a vendor API to find a product skeleton.

    I have all that part working and have all the product info sitting in $_POST fields ready to be processed on the "Is this the one?" confirmation screen.

    What I would really like to do with this is pass the $_POST over to collect_info.php and allow it to handle the editing and actual product insertion. I think I see how to bypass collect_info and go to preview_info, but I'd rather not do it that way.

    Can I do this or will I have to settle for preview_info?

  2. #2
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,461
    Plugin Contributions
    29

    Default Re: v1.5.7d Adding Products from vendor API

    I think you should review how collect_info handles the data to pre-populate the fields when you use the Back button on the preview_info page.
    Then duplicate that action with your custom insert button to load the same fields in collect_info, to be able to review it before inserting it.
    Steve
    github.com/torvista: Spanish Language Pack, Google reCaptcha, Structured Data, Multiple Copy-Move-Delete, Image Checker, BackupMySQL Admin/Auto, Product Listing Sorter...

  3. #3
    Join Date
    Aug 2009
    Location
    Greeneville, TN USA
    Posts
    51
    Plugin Contributions
    0

    Default Re: v1.5.7d Adding Products from vendor API

    Thanks torvista.

    I ended up looking at how preview_product handled the "Back" button, and the URL I ended up on when calling collect_php in various circumstances.

    This form header was the answer I was looking for..

    Code:
    	<?php echo zen_draw_form('product', FILENAME_PRODUCT, 'cPath=' . $cPath . '&action=new_product', 'post', 'enctype="multipart/form-data" class="form-horizontal"'); ?>
    After getting the visible and hidden values I want to appear on collect_info into $_POST of course.

 

 

Similar Threads

  1. v155 API needed for data feed from vendor...
    By ntsllc in forum General Questions
    Replies: 8
    Last Post: 20 May 2016, 05:31 PM
  2. v154 Attributes for 30K+ Products - Pulled from API across 300+ Categories - HELP!!!
    By gizmosandguns in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 4 Feb 2016, 06:14 PM
  3. API for adding categories and products?
    By ddev in forum General Questions
    Replies: 1
    Last Post: 26 Aug 2009, 10:28 AM
  4. HOW TO CHANGE FROM API signature to API certificate?
    By joyint in forum PayPal Website Payments Pro support
    Replies: 1
    Last Post: 24 Aug 2008, 08:34 AM

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