Page 5 of 6 FirstFirst ... 3456 LastLast
Results 41 to 50 of 57
  1. #41
    Join Date
    Jun 2009
    Posts
    7
    Plugin Contributions
    0

    Default Re: Delivery control

    hello zen-cart guru

    i tried to solve my problem with delivery control mod,
    sadly i have limited knowledge of php
    i tried to look at the script.

    i found these code in the script in delivery_new.php

    PHP Code:
    if($action == "add"// ADD PRODUCT DELIVERY !!!
    {                   
       ...            
       ...
       ...

       if(
    $step 3)
       {
          
    //test if record exist
          
    $exist $db->Execute("select prod_quantity AS quantity
                                 from delivery_products
                                 where del_id = '"
    .$dID."' 
                                 and prod_id = '"
    .$add_product_products_id."' ");

       

          
    $action='update';

          echo 
    "<tr class=\"dataTableRow\">
           <form action='
    $PHP_SELF?dID=$dID&action=$action' method='POST'>\n";
               echo 
    "<td class='dataTableContent' align='right'><b>STEP 3:</b></td>";
               echo 
    "<td class='dataTableContent' valign='top'>
                 <input name='add_product_quantity' size='5' value='1'>" 
    ADDPRODUCT_TEXT_CONFIRM_QUANTITY "</td>
             <td align='center'><input type='submit' value='" 
    ADDPRODUCT_TEXT_CONFIRM_ADDNOW "'></td></tr>";

          echo 
    "<tr><td></td><td class='dataTableContent' valign='top'></td>";
             if (
    $exist->RecordCount() > 0) {
                
    //record exist!
                
    echo ('<tr><td></td>
                <td><font color="red">Product exists and it\'s quantity will be updated!</font>
                <br>
                <i>Original quantity: ' 
    $exist->fields[quantity] . '</i>
                </td>
                <td></td></tr>'
    );
                echo 
    "<input type='hidden' name='exist' value='yes'>";

             }


          echo 
    "<td>";

          if(IsSet(
    $add_product_options))
          {
             foreach(
    $add_product_options as $option_id => $option_value_id)
                {
                   echo 
    "<input type='hidden' name='add_product_options[$option_id]' value='$option_value_id'>";
                }
          }
       
          echo 
    "<input type='hidden' name='add_product_categories_id' value='$add_product_categories_id'>";
          echo 
    "<input type='hidden' name='pID' value='$add_product_products_id'>";
          echo 
    "</td>\n";
          echo 
    "</form></tr>\n";
       }

       echo 
    "</table>\n";
       echo 
    '<br><center><a href="' zen_href_link(FILENAME_DELIVERY'dID='.$dID'NONSSL') . '">' zen_image_button('button_cancel.gif'IMAGE_CANCEL) . '</a></center>';


    and these code on top of the delivery_new.php, and i copied to a file named test.php

    PHP Code:
    require('includes/application_top.php');

    $action = (isset($_GET['action']) ? $_GET['action'] : '');
    $pID zen_db_prepare_input($_POST['pID']);
    $dID zen_db_prepare_input($_GET['dID']);
    $exist zen_db_prepare_input($_POST['exist']);
    $step zen_db_prepare_input($_POST['step']);
    $add_product_categories_id zen_db_prepare_input($_POST['add_product_categories_id']);
    $add_product_products_id zen_db_prepare_input($_POST['add_product_products_id']);
    $add_product_quantity zen_db_prepare_input($_POST['add_product_quantity']);


    if (
    zen_not_null($action)) {
    switch (
    $action) {

    case 
    'update':
        if (
    $exist == 'yes')
        {
        
    //record exist!

        
    $db->Execute("UPDATE delivery_products
        
                      SET prod_quantity = '"
    .$add_product_quantity."'

                  WHERE del_id = '"
    .$dID."' and prod_id = '".$add_product_products_id."' ");

        echo 
    "UPDATE delivery_products SET prod_quantity = '".$add_product_quantity."' WHERE del_id = '".$dID."' and prod_id = '".$add_product_products_id."' ";

        
    $messageStack->add('DB updated! Unique price &pound;'.$add_product_new_price.' of product ID #'.$pID.' modified for customer ID #'.$cID.' successfuly.''success');

            } else {

        
    //record doesn't exist!

        
    $db->Execute("INSERT INTO delivery_products (del_id, prod_id, prod_quantity)

                      VALUES ('"
    .$dID."','".$add_product_products_id."','".$add_product_quantity."')");

            echo 
    "INSERT INTO delivery_products (del_id, prod_id, prod_quantity) VALUES ('".$dID."','".$add_product_products_id."','".$add_product_quantity."')";

        
    $messageStack->add('DB updated! Unique price &pound;'.$add_product_new_price.' for product ID #'.$pID.' added to customer ID #'.$cID.' successfuly.''success');
            }

       
    ob_start();
       echo 
    "Test";
       
    header("Location:" zen_href_link(FILENAME_DELIVERY"dID=" $dID"NONSSL"));
       
    ob_flush();

    break;

    ...
    ...
    ...



    i tried to change the form_action to other file i created (test.php)
    the value sent by _POST method is valid and correct

    if there is require('includes/application_top.php'); on top of the script, every time i click submit it would always go back to admin home and not process the rest of the code,

    if i remove the require('includes/application_top.php'); i cannot use the function like $db->Execute, etc, which is required for the rest of the code

    is there any mistake?
    hope someone can help me out

    many thanks

  2. #42
    Join Date
    Jun 2008
    Posts
    47
    Plugin Contributions
    0

    Default Re: Delivery control

    chemvil have you applied the new security_patch_v138_20090619 that was released the other day?

    I have found that the update has caused the problem you are describing where you make a change/ press buttons and you go back to main page with now change being made for me this is happing on all parts of my site.

    To see if it is this causing it try making a change to a shipping price and see if you are kicked back to the main admin page or not.

    hope this helps

  3. #43
    Join Date
    Jun 2009
    Posts
    7
    Plugin Contributions
    0

    Default Re: Delivery control

    hi starbuck

    yes, i have applied the security patch the other day,
    i have not tried using the delivery control before security patch applied, i will try that also

    i tried to change the shipping price in Modules>Shipping, and i had successfully changed the price without getting kicked back to the admin home.

    will try to see if i get kick back to admin page after pressing change/submit button on any other part of my site.

    thanks a lot for the info

  4. #44
    Join Date
    Jun 2009
    Posts
    7
    Plugin Contributions
    0

    Default Re: Delivery control

    HI starbucks,

    seems there is some changes in the security patch. i tried to reinstall new zen-cart, and tried the delivery control before i applied the security patch, and it worked ok

    i guess it's the security patch that made the delivery control mod not working, any idea how to fix?

    many thanks

  5. #45
    Join Date
    Sep 2009
    Location
    Castle Rock, CO
    Posts
    1
    Plugin Contributions
    0

    Default Re: Delivery control

    I stumbled across a few things wrong with the "delivery_new.php" page with regards to security patched version 1.3.8. The biggest hurdle was to change "update" to something else... not that it was a hurdle of technical difficulty, just that after hours of head scratching, I just thought... hmm... maybe "update" is a bad thing to put on the querystring. So there ya have it, I changed it on lines:

    50
    373

    I used "updateDelivery"

    Also, I'm going to attempt to insert the new MySQL call from line 238:

    Code:
    $result = $db -> Execute("SELECT products_name, p.products_id, categories_name, ptc.categories_id FROM " . TABLE_PRODUCTS . " p LEFT JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd ON (pd.products_id=p.products_id) LEFT JOIN " . TABLE_PRODUCTS_TO_CATEGORIES . " ptc ON (ptc.products_id=p.products_id) LEFT JOIN " . TABLE_CATEGORIES_DESCRIPTION . " cd ON (cd.categories_id=ptc.categories_id) ORDER BY categories_name");

    I also manually or "hard coded" the Database Query names wherever I needed to use a prefix. (Sorry - too many places to count)

    Hope this helps someone!

  6. #46
    Join Date
    Feb 2009
    Posts
    10
    Plugin Contributions
    0

    Default Re: Delivery control

    hello,

    Please can someone fix the published package contains errors and upload the new version?

    1) missing semicolon in SQL script
    2) correction relative references to sql tables
    3) and some others..

    Many thanx!

  7. #47
    Join Date
    Jun 2008
    Posts
    187
    Plugin Contributions
    0

    Default Re: Delivery control

    Do i assume this module development has died? i just downloaded the addon and installed it it seems to installed without error.

    However......

    i can't seem to add any deliveries or anything like that. When i click either of the 2 buttons at the top of:

    reports - > delivery

    i click the buttons at the top of this page and nothing happens.

    i've done the altered multi langugae thing as we don't use it so i've removed it as per the readme.txt

    any people still active to help?
    Maybe this mod should be removed as the download doesn't seem to function, and no updates have been applied?

    regards
    Andy.

  8. #48
    Join Date
    Mar 2010
    Posts
    32
    Plugin Contributions
    0

    Default Delivery control - Issue with ZC v1.3.9

    Hi there

    I love delivery control. Great module!

    But after upgrading to ZC v1.3.9, the module does not work properly anymore.

    I am still able to create new deliveries but I am no longer able to add products to a delivery. I can select a product for a given delivery but after adding it to the delivery, the added product does just not show up in the delivery, i.e. the delivery still has no product assigned.

    Anyone having similar problems when upgrading to v1.3.9?

  9. #49
    Join Date
    Sep 2005
    Location
    Malmö, Sweden
    Posts
    120
    Plugin Contributions
    4

    Default Re: Delivery control

    I had the same problem with Delivery control and ZC v1.3.9f.
    I were able to fix it by renaming the action "update" to "devUpdate".

    On line 47: Change "case 'update':" to "case 'devUpdate':"
    On line 371: Change "$action='update';" to "$action='devUpdate';"

    Good luck and thanx for the mod!

  10. #50
    Join Date
    Jun 2008
    Posts
    59
    Plugin Contributions
    0

    Default Re: Delivery control

    Quote Originally Posted by Andy_GS View Post
    i can't seem to add any deliveries or anything like that. When i click either of the 2 buttons at the top of:

    reports - > delivery

    i click the buttons at the top of this page and nothing happens.

    i've done the altered multi langugae thing as we don't use it so i've removed it as per the readme.txt
    I get the exact same thing on 1.3.8a and I have also followed all the tips to take out the multilanguage part and rename the word "update". The buttons at the top still do nothing.

    I have tried manually adding a record to the delivery table and the screen then shows one delivery (which proves that the new table is there and everything) but the buttons just won't do anything.

    Is this something to do with a security patch or something along those lines perhaps?

    I'd love to get this working and would be very grateful of any further ideas.

    All the best

    Simon

 

 
Page 5 of 6 FirstFirst ... 3456 LastLast

Similar Threads

  1. Per Item - But different prices for 1 day delivery, 3 day delivery etc.
    By rowby in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 28 Nov 2010, 10:25 PM
  2. Free Delivery Coupon still adding VAT/TAX for delivery
    By PudzPud in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 1
    Last Post: 12 Oct 2009, 08:57 AM
  3. Category control
    By porque in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 1 Sep 2007, 03:27 AM

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