Page 6 of 9 FirstFirst ... 45678 ... LastLast
Results 51 to 60 of 85
  1. #51
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,371
    Plugin Contributions
    94

    Default Re: Multiple Ship-To Addresses [Support Thread]

    Understood; I'll get three GitHub issues noted:

    1. The coding error that resulted in the database barf when the order includes a product with attributes.
    2. The coding error that resulted in the "new error" you reported.
    3. A change to the language text, providing "better" guidance.


    Just so I'm clear, did the change I made to your test site (issue #1) correct that debug-log generation?
    Last edited by lat9; 18 Aug 2017 at 08:24 PM. Reason: Added another bugfix issue

  2. #52
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,464
    Plugin Contributions
    11

    Default Re: Multiple Ship-To Addresses [Support Thread]

    Yes ma'am!

  3. #53
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,371
    Plugin Contributions
    94

    Default Re: Multiple Ship-To Addresses [Support Thread]

    OK, made (yet another) change, this time to /YOUR_ADMIN/includes/classes/observers/class.admin_multiship_observer.php. Find:
    Code:
        public function update(&$class, $eventID, $p1a) 
        {
            global $db;
            $this->eventID = $eventID;
    and add the highlighted additional parameters:
    Code:
        public function update(&$class, $eventID, $p1a, &$p2, &$p3) 
        {
            global $db;
            $this->eventID = $eventID;
    @dbltoe, I've applied this correction to your test site.

  4. #54
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,464
    Plugin Contributions
    11

    Default Re: Multiple Ship-To Addresses [Support Thread]

    That got it!

    Take the rest of the day off. You deserve it.

  5. #55
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,371
    Plugin Contributions
    94

    Default Re: Multiple Ship-To Addresses [Support Thread]

    Quote Originally Posted by dbltoe View Post
    That got it!

    Take the rest of the day off. You deserve it.
    Yeah! Thanks for providing the test-area. I'll get those language changes packaged up in preparation for this plugin's update.

  6. #56
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,464
    Plugin Contributions
    11

    Default Re: Multiple Ship-To Addresses [Support Thread]

    Newest little twist in the packing slip department.

    I have modified the standard packing slip on all our sites to reflect an image of the product being shipped. In a standard packing slip, the change starts around line 142 and looks like the following (additions in red)
    Code:
        <td><table border="0" width="100%" cellspacing="0" cellpadding="2">              <!--   dbltoe -- Add Product Image      -->
          <tr class="dataTableHeadingRow">
            <td class="dataTableHeadingContent">Image</td>
            <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_PRODUCTS; ?></td> <!-- Dropped colspan="2" -->
            <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_PRODUCTS_MODEL; ?></td>
          </tr>
    <?php
        for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {
          echo '      <tr class="dataTableRow">' . "\n" .
               '        <td class="dataTableContent" valign="top" align="right"><img src="' . DIR_WS_CATALOG . DIR_WS_IMAGES . zen_get_products_image($order->products[$i]['id']) .'" align="left" width="' . IMAGE_ON_INVOICE_IMAGE_WIDTH . '" height="' . IMAGE_ON_INVOICE_IMAGE_HEIGHT . '" />' . $order->products[$i]['qty'] . '&nbsp;x</td>' . "\n" .
               //dbltoe - Add Product Image
              '        <td class="dataTableContent" valign="top">' . $order->products[$i]['name'];
    This is the code in the packingslip_multiship that I need to adjust
    Code:
          <tr class="dataTableHeadingRow">        <td class="dataTableHeadingContent" colspan="2"><?php echo TABLE_HEADING_PRODUCTS; ?></td>
            <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_PRODUCTS_MODEL; ?></td>
          </tr>
    <?php
        foreach ($order->products as $currentProduct) {
            if ($currentProduct['orders_multiship_id'] != $multiship_id) {
            continue;
            }
    ?>
          <tr class="dataTableRow">
            <td class="dataTableContent" valign="top" align="right"><?php echo $currentProduct['qty']; ?>&nbsp;x</td>
            <td class="dataTableContent" valign="top"><?php echo $currentProduct['name']; ?>
    I've tried several options with no joy.

    Any assistance greatly appreciated.

  7. #57
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,371
    Plugin Contributions
    94

    Default Re: Multiple Ship-To Addresses [Support Thread]

    @dbltoe, while not exactly what you had originally, I believe that the following will get you close ... and without a lot of "carving up":

    Code:
        <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
          <tr class="dataTableHeadingRow">
    <?php
    //-bof-20180125-lat94dbltoe-Add 'images' column
    ?>
            <td class="dataTableHeadingContent">Image</td>
    <?php
    //-eof-20180125-lat94dbltoe-Add 'images' column
    ?>
            <td class="dataTableHeadingContent" colspan="2"><?php echo TABLE_HEADING_PRODUCTS; ?></td>
            <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_PRODUCTS_MODEL; ?></td>
          </tr>
    <?php
        foreach ($order->products as $currentProduct) {
            if ($currentProduct['orders_multiship_id'] != $multiship_id) {
            continue;
            }
    ?>
          <tr class="dataTableRow">
    <?php
    //-bof-20180125-lat94dbltoe-Add image to column
    ?>
            <td class="dataTableContent" valign="top" align="left"><?php echo zen_image(DIR_WS_CATALOG . DIR_WS_IMAGES . zen_get_products_image($order->products[$i]['id']), '', IMAGE_ON_INVOICE_IMAGE_WIDTH, IMAGE_ON_INVOICE_IMAGE_HEIGHT); ?></td>
    <?php
    //-eof-20180125-lat94dbltoe-Add image to column
    ?>
            <td class="dataTableContent" valign="top" align="right"><?php echo $currentProduct['qty']; ?>&nbsp;x</td>
            <td class="dataTableContent" valign="top"><?php echo $currentProduct['name']; ?>
    <?php

  8. #58
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,464
    Plugin Contributions
    11

    Default Re: Multiple Ship-To Addresses [Support Thread]

    Sorry for the delay in getting back to you. I had accidentally added two mods that crashed multiship.

    I slightly changed the code to
    Code:
          <tr class="dataTableRow">        <!-- BOF Add Image 2 of 2 - dbltoe -->
            <td class="dataTableContent" valign="top" align="left"><?php echo zen_image(DIR_WS_CATALOG . DIR_WS_IMAGES . zen_get_products_image($order->products[$i]['id']), '', IMAGE_ON_INVOICE_IMAGE_WIDTH, IMAGE_ON_INVOICE_IMAGE_HEIGHT); ?></td>
            <!-- EOF Add Image 2 of 2 - dbltoe -->
            <td class="dataTableContent" valign="top" align="center"><?php echo $currentProduct['qty']; ?></td>
            <td class="dataTableContent" valign="top"><?php echo $currentProduct['name']; ?>
    <?php
    
    
            if (isset($currentProduct['attributes']) && (sizeof($currentProduct['attributes']) > 0)) {
                foreach ($currentProduct['attributes'] as $currentAttribute) {
    ?>
              <br /><span class="nobreak"><small>&nbsp;<i> - <?php echo $currentAttribute['option'] . ': ' . nl2br(zen_output_string_protected($currentAttribute['value'])); ?></i></small></span>
    <?php
                }
    ?>
            </td>
            <td class="dataTableContent" valign="top"><?php echo $currentProduct['model']; ?></td>
    <?php
            }
    ?>
          </tr>
    page source reveals that all I'm getting from the line in red is this
    Code:
    <td class="dataTableContent" valign="top" align="left"><img src="/155f/images/" border="0" alt="" width="IMAGE_ON_INVOICE_IMAGE_WIDTH" height="IMAGE_ON_INVOICE_IMAGE_HEIGHT"></td>

  9. #59
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,371
    Plugin Contributions
    94

    Default Re: Multiple Ship-To Addresses [Support Thread]

    Since I'd mimicked your original code, I assumed that the IMAGE_ON_INVOICE_IMAGE_WIDTH/HEIGHT definitions were available; your page-source shows differently.

  10. #60
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,464
    Plugin Contributions
    11

    Default Re: Multiple Ship-To Addresses [Support Thread]

    Sorry was rushing out the door to PT.
    the problem is the undefined constraints but, it's not pulling the image correctly before that. Only gets directory and folder

 

 
Page 6 of 9 FirstFirst ... 45678 ... LastLast

Similar Threads

  1. v151 Multiple Ship - From addresses for Shipping (UPS module)
    By samueljjs in forum Addon Shipping Modules
    Replies: 1
    Last Post: 22 Apr 2014, 03:03 PM
  2. Ship to multiple addresses?
    By Nimbuz in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 3 Dec 2007, 06:28 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