Results 1 to 5 of 5

Hybrid View

  1. #1
    Join Date
    Sep 2007
    Location
    Herne Bay, Kent, England
    Posts
    182
    Plugin Contributions
    0

    Default How does the ordering process "come together"

    Hi everyone. I'm developing my own plugin to allow a Warehouse Location to be shown on the paperwork we use to pick the stock to facilitate speeding location of the stock. It's going well but I need to input information into TABLE_ORDERS_PRODUCTS and I can't find the appropriate php file where this happens for each order. Could anyone point me in the right direction? I've tried using Developers Toolkit but it hasn't been very useful.
    Many thanks in anticipation.
    Philip

  2. #2
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: How does the ordering process "come together"

    I see you've been posting the same question in the Super Orders support thread.

    My question is: WHY do you think you need to put ANYTHING in the orders_products table?

    If your warehouse-location-info is already in another table, and especially if it's already related to your products in some way, then why don't you just tell whatever tool you use to print your warehouse sheets (I'm guessing Super Orders since that's where you started posting) to look up that data from those other tables, and output it that way.
    There's no need to store warehouse location info in "yet another" place in the database, if it's already available in the database somewhere.


    In short, you've been posting with a technical "solution" already madeup in your mind. I'm not sure it's the best solution. I don't want to give you answers that push you further in the wrong direction. So let's back WAY up and start with what is the business problem you're trying to solve, and what data/tools you already have available. And work out the best solution from there.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Sep 2007
    Location
    Herne Bay, Kent, England
    Posts
    182
    Plugin Contributions
    0

    Default Re: How does the ordering process "come together"

    I take your point Dr Byte. I know the direction in which I should be going - I just can't get my head around the code.

    BTW I'm not in the habit of multiple posting - I just realised this was the more appropriate place.

  4. #4
    Join Date
    Sep 2007
    Location
    Herne Bay, Kent, England
    Posts
    182
    Plugin Contributions
    0

    Default Re: How does the ordering process "come together"

    What I should have done yesterday was explain what I think the best solution to my problem is and seek help with that. Unfortunately embarrassment/pride got in the way. I'm over that now.
    I should say at the outset that I am new to php - in fact this is my first "real" project.
    I do indeed use super orders but a lot of the grunt work is done by ZC files, in this case order.php. I've put my data in warehouse_location in the PRODUCTS table. It seems to me that as data from the orders_products table, for each item I need to call warehouse location from TABLE_PRODUCTS. The best common link would be product_model. The code to achieve that escapes me and any help would be much appreciated.
    Regards
    Philip

  5. #5
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: How does the ordering process "come together"

    The best common link would be the products_id.

    Code:
    SELECT warehouse_location from products where products_id = 33;
    Code:
    select op.*, p.warehouse_location from orders_products op, products p 
    where op.products_id=p.products_id
    and orders_id=5;
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. v151 Display "add to cart" and "Call for price together"
    By Tadj Hemingway in forum General Questions
    Replies: 2
    Last Post: 6 Mar 2015, 07:53 PM
  2. How to put "price" and "add to cart" together?
    By leisbi in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 9 May 2011, 01:34 AM
  3. How does Zen-Cart "know" what your "custom" directory is?
    By alicia1234 in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 4 Dec 2008, 01:46 AM
  4. where does "Discounts may vary based on options above" come from?
    By kappaluppa in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 14 Apr 2007, 07:34 PM

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