Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2008
    Location
    Central USA
    Posts
    2
    Plugin Contributions
    0

    Default inject new order from outside php source

    Okay, what I am wanting to do is use an existing PHP page that selects a large group of variables and inject an order directly

    I will need to
    - search if there is an active order with items already
    if theres no order
    - create it
    if there is
    - then add info to existing order as new line

    is there an example of where i can find this, or a pointer to what fields i will need to directly edit (once the order is entered, i am sure the view cart feature will allow deletion of whatever i add, so that shouldnt be an issue)

    I will be adding a custom defined product id (which will be generated by the selections on the page) a description and price (quantity will always be 1, with no editing of quantity)

  2. #2
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: inject new order from outside php source

    At one level Zen cart is just a database with 1,300 php scripts to control input and output of the data. So you could bypass the Zen Cart code and address the database directly from your own script. But I suspect that you would have to write a lot of complex PHP to do so.

    I can't help feeling that this is a case of the tail wagging the dog. In essence you're asking how to replicate the order class, and all the stuff that goes around it, when maybe a better approach would be to take advantage of the existing back end processing and instead inject your php page specific information into a clone of the checkout_confirmation page.

    But whichever way you choose to do this, it's way bigger than can really be handled in a forum post.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  3. #3
    Join Date
    Jun 2008
    Location
    Central USA
    Posts
    2
    Plugin Contributions
    0

    Default Re: inject new order from outside php source

    well, i cant find a way to create the ability i need within the system

    basically its this


    select dropdown 1 (numeric value, 1-50)
    select dropdown 2 (numeric value, 1-50)
    select from 2 checkboxes (optional, 8 total)
    insert data into 4 input boxes

    thats the basics of what it is, actually theres a few more boxes but from the top of my head cant list them all, it fits though in a simple line, and can be limited to 50-80 chars most likely on printout, the unique id will be mostly what defines it

    this data will determine pricing and all need to be entered
    Last edited by kender; 8 Jun 2008 at 02:11 PM.

 

 

Similar Threads

  1. Change price dynamically from outside php script
    By coyotech in forum General Questions
    Replies: 0
    Last Post: 30 Jan 2012, 08:24 PM
  2. import customers from outside source
    By steveL in forum Managing Customers and Orders
    Replies: 4
    Last Post: 16 Oct 2008, 12:26 PM
  3. Canada Post Mod vs SQL INJECT alert with SHOPPING_CART.php
    By imfsub12 in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 1 Oct 2008, 08:52 PM
  4. HTML Source code keywords differ from meta_tags.php
    By MeltDown in forum General Questions
    Replies: 1
    Last Post: 9 Mar 2007, 05:57 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