-
Multiple Ship-To Addresses [Support Thread]
This plugin enables your store to offer your customers multiple shipping addresses on a single order, so long as the currently-selected payment method supports shipping to multiple addresses! Many payment modules will not provide a store-owner with seller protection if a customer's products are shipped to an unvetted address.
For the initial release of the plugin, only the moneyorder payment method has been updated to provide this support. The intent with this plugin's release is to provide a basic framework that can be tested (and otherwise improved) by the Zen Cart community and within which other, more intricate, payment methods can also support multiple ship-to addresses.
Every effort has been made to reduce the core-file changes required. Where possible, the change has been limited to the insertion of one or more Zen Cart notifiers at significant points. When it was not possible, the changes are spanned by comments indicating the beginning (//-bof-multiship) and end (//-eof-multiship) of the code-fragments.
I'm preparing to upload v1.0.0 BETA1 to the plugins area and will post its download link once I receive it.
-
Re: Multiple Ship-To Addresses [Support Thread]
-
Re: Multiple Ship-To Addresses [Support Thread]
Quote:
Originally Posted by
lat9
BETA1 is now available via the Zen Cart Plugins. You can also see the progress from beta to v1.0.0 on the plugin's github repository:
https://github.com/lat9/multiship
-
Re: Multiple Ship-To Addresses [Support Thread]
BETA2 is now available via github (https://github.com/lat9/multiship/ar....0.0-BETA2.zip). This version incorporates "understanding" that an order can contain a mixture of virtual and physical products.
-
Re: Multiple Ship-To Addresses [Support Thread]
Looking for opinions!
- Is a one-time charge applied on a per-order or per-ship-to-address basis? The current implementation applies the charge on a per-ship-to-address. I'm not asserting that this is correct, just stating what's currently happening.
- Let's say a customer has 4 "Product 1" items in their cart and they choose to ship 2 to one address and 2 to another. Subsequently (and before confirming the order), the customer goes to the shopping_cart page and reduces the quantity of "Product 1" to 2. Does the "Ship-To" address for the 2 remaining items revert to the default shipping address?
-
Re: Multiple Ship-To Addresses [Support Thread]
I've just uploaded BETA3 to the plugins area. This version includes changes that react to changes to the shopping cart from the shopping_cart page plus a variety of bugfixes.
-
Re: Multiple Ship-To Addresses [Support Thread]
I have not done a lot with this, but it appears the TEXT emails for the order have:
Grand Total:160
This should really be:
Grand Total:<space>$160.00
Call me fussy ... :cool:
-
Re: Multiple Ship-To Addresses [Support Thread]
Quote:
Originally Posted by
Ajeh
I have not done a lot with this, but it appears the TEXT emails for the order have:
Grand Total:160
This should really be:
Grand Total:<space>$160.00
Call me fussy ... :cool:
Nope, call you meticulous! Thanks for the report; I'll get it updated in the next (hopefully final?) beta.
-
Re: Multiple Ship-To Addresses [Support Thread]
The HTML emails were an absolute mess:blink:; the correction is up on github.com/lat9 and will be included in the next beta/rc release.
-
Re: Multiple Ship-To Addresses [Support Thread]
Quote:
Originally Posted by
lat9
I've just uploaded BETA3 to the plugins area. This version includes changes that react to changes to the shopping cart from the shopping_cart page plus a variety of bugfixes.
BETA3 is now available for download.
-
Re: Multiple Ship-To Addresses [Support Thread]
I've just uploaded v1.0.0-FINAL (downloadable here, when available: http://www.zen-cart.com/downloads.php?do=file&id=1823) to the plugins. This version
- Corrects the formatting of order-confirmation emails
- Corrects the "misspelling" of a variable name
- Includes admin-console changes to the formatting of invoices and packing slips for multiple ship-to address orders
- Includes admin-console changes to allow sub-order status values to be independently changed.
-
Re: Multiple Ship-To Addresses [Support Thread]
Quote:
Originally Posted by
lat9
I've just uploaded v1.0.0-FINAL (downloadable here, when available:
http://www.zen-cart.com/downloads.php?do=file&id=1823) to the plugins. This version
- Corrects the formatting of order-confirmation emails
- Corrects the "misspelling" of a variable name
- Includes admin-console changes to the formatting of invoices and packing slips for multiple ship-to address orders
- Includes admin-console changes to allow sub-order status values to be independently changed.
It's now available in the Plugins ...
-
Re: Multiple Ship-To Addresses [Support Thread]
lat9, This is a great mod.
I am getting an error with customer file uploads (product attribute).
If a customer adds to cart
Product 1 with file "a" attached
Product 1 with file "b" attached
The order process returns a blank page once you attempt to pass the order confirmation page and place the order. everything looks great on the final confirmation page but the order is just not going through.
Do you have any idea why?
Thanks,
Mel
-
Re: Multiple Ship-To Addresses [Support Thread]
Is their a way to make the customer shipping addresses in Multiship searchable from the main orders page? I sometimes need to search orders by city but the multiship orders are not displaying in the search results.
-
Re: Multiple Ship-To Addresses [Support Thread]
Quote:
Originally Posted by
mello_me
lat9, This is a great mod.
I am getting an error with customer file uploads (product attribute).
If a customer adds to cart
Product 1 with file "a" attached
Product 1 with file "b" attached
The order process returns a blank page once you attempt to pass the order confirmation page and place the order. everything looks great on the final confirmation page but the order is just not going through.
Do you have any idea why?
Thanks,
Mel
Blank page = debug-log file present in your /logs directory. The contents of the log file will help debug your problem.
-
Re: Multiple Ship-To Addresses [Support Thread]
Quote:
Originally Posted by
mello_me
Is their a way to make the customer shipping addresses in Multiship searchable from the main orders page? I sometimes need to search orders by city but the multiship orders are not displaying in the search results.
That's a great idea, I'll put it on the list of enhancements requested for this module.
-
Re: Multiple Ship-To Addresses [Support Thread]
-
Re: Multiple Ship-To Addresses [Support Thread]
How about posting your debug-log file from the file-upload product? I used a "stock" ZC 1.5.1 install with Multi-Ship, added 3 of the products that allow a file-upload (with a file) and had no issue going through checkout.
Do you have other plugins installed as well?
-
Re: Multiple Ship-To Addresses [Support Thread]
I uninstalled and then re-installed my db and all files and everything works well with no additional changes... must have been missing something to cause that glitch. Sorry for the trouble. Works perfectly.
-
Re: Multiple Ship-To Addresses [Support Thread]
Quote:
Originally Posted by
mello_me
I uninstalled and then re-installed my db and all files and everything works well with no additional changes... must have been missing something to cause that glitch. Sorry for the trouble. Works perfectly.
No trouble, I'm glad you got your issue sorted out.
-
Re: Multiple Ship-To Addresses [Support Thread]
Multiple Ship-To Addresses, v1.0.0, does not work with Zen Cart v1.5.3. I'm looking into the long-term solution and will post back here once it's finished.
-
Re: Multiple Ship-To Addresses [Support Thread]
I've submitted v1.1.0 to the Plugins for approval; it's v1.5.3 enabled (and still supports v1.5.1 and v1.5.2).
Important Note: Since this plugin provides an update to the Check/Money Order payment method that specifically enables the multiple ship-to addresses, it's important to ensure that the payment method is removed prior to the plugin's installation and then re-enabled to provide the multiple shipping address support!
-
Re: Multiple Ship-To Addresses [Support Thread]
Quote:
Originally Posted by
lat9
I've submitted v1.1.0 to the Plugins for approval; it's v1.5.3 enabled (and still supports v1.5.1 and v1.5.2).
Important Note: Since this plugin provides an update to the Check/Money Order payment method that specifically enables the multiple ship-to addresses, it's important to ensure that the payment method is removed prior to the plugin's installation and then re-enabled to provide the multiple shipping address support!
v1.1.0 is now available in the Plugins ...
-
Re: Multiple Ship-To Addresses [Support Thread]
I've just submitted v1.1.1 to the plugins for review. Updated to correct:
1) Unwanted redirect back to checkout_shipping after selecting new address
2) Improper handling of TEXT and checkbox attributes
3) More properly handle changes to the shopping cart after multi-ship addresses have been selected.
4) Whitescreen when UPS shipping is selected.
-
Re: Multiple Ship-To Addresses [Support Thread]
v1.1.1 is now available for download.
-
Re: Multiple Ship-To Addresses [Support Thread]
Thanks for your efforts! This has been discussed for a LONG time!
Is there a demo site anywhere? I'd like to see how this looks to a user.
-
Re: Multiple Ship-To Addresses [Support Thread]
Sorry, I didn't see your request before this. I don't have a test site set up currently, but will get one up for perusal.
-
Re: Multiple Ship-To Addresses [Support Thread]
I have reached the point where I am tailoring the various tpl_account and tpl_address files to be 153 responsive, have only just downloaded this mod but not yet looked at it in detail, and am wondering whether the mod addresses the following.
1. SET AS PRIMARY address button forces customer to enter new address details as primary address, rather than making an existing non-primary address, under which the button lies, as the primary address. This seems counter-intuitive and makes me want to change the button wording to "Create new primary address" or such-like. Worse still, if the maximum number of addresses is set to 2, allowing customer to have say a home and a business shippping address, and customer has already provided the maximum number of addresses, clicking SET AS PRIMARY button produces the annoying error message that the customer is not allowed to create any more addresses than the maximum, and must therefore delete one address or plead with the storeowner. Hmmm!
2. When customer provides a company name, the address format invariable begins with the company name, followed by the customer name and then the address. What I would like to do is switch the positions of the customer and company names, so that the customer name comes first. This is standard practice in Australia and many other Anglicised countries.
Thanks
-
Re: Multiple Ship-To Addresses [Support Thread]
-
Re: Multiple Ship-To Addresses [Support Thread]
This plugin makes no modification to the entry and/or formatting of any customer address; its purpose is simply to allow a customer to ship to multiple addresses in a single order.
-
Re: Multiple Ship-To Addresses [Support Thread]
v1.1.2 is now available from the Plugins area. The update provides downwardly-compatible changes required for Zen Cart v1.5.4.
-
Re: Multiple Ship-To Addresses [Support Thread]
Please update this mod with the new copy of
./includes/modules/pages/checkout_confirmation/header_php.php
from the November 2015 patches
https://www.zen-cart.com/showthread....-November-2015
-
Re: Multiple Ship-To Addresses [Support Thread]
Quote:
Originally Posted by
swguy
Er, this plugin does not modify that file.
-
Re: Multiple Ship-To Addresses [Support Thread]
Thanks for double checking. (I compiled the list very quickly so I had a few false positives.)
-
Re: Multiple Ship-To Addresses [Support Thread]
I've submitted v1.1.3 to the plugins for review (https://www.zen-cart.com/downloads.php?do=file&id=1823). That version uses Zen Cart v1.5.5 as the basis for any core- or template-file changes and has changed all class constructor names to __construct for PHP 7.0 compliance.
-
Re: Multiple Ship-To Addresses [Support Thread]
v1.1.3 is now available for download.
-
Re: Multiple Ship-To Addresses [Support Thread]
Excellent work as usual. And, as usual, I'm like a dog with a bone when testing. One thing I found with packing slips.
Scenario is three items to three different addresses. All works fine until the printing of the packing slips. Although the page-break-before: always style is in the packingslip_multiship.php, it only seems to fire prior two the third item. Hence causing items one and two to remain on the same page.
No joy in trying to adjust it myself.
-
Re: Multiple Ship-To Addresses [Support Thread]
Quote:
Originally Posted by
dbltoe
Excellent work as usual. And, as usual, I'm like a dog with a bone when testing. One thing I found with packing slips.
Scenario is three items to three different addresses. All works fine until the printing of the packing slips. Although the page-break-before: always style is in the packingslip_multiship.php, it only seems to fire prior two the third item. Hence causing items one and two to remain on the same page.
No joy in trying to adjust it myself.
Thanks for the compliment. As you can tell from the last-update date, it's been a while since I've "touched" this; it'll be a bit before I can investigate further.
-
Re: Multiple Ship-To Addresses [Support Thread]
@dbltoe, what browser are you using when the page-break goes missing?
-
Re: Multiple Ship-To Addresses [Support Thread]
All on Windows 10 with order containing three separate delivery addresses.
- Chrome shows no print preview. Print command shows first to addresses on page one and third on page two. Prints two pages as shown in printer menu.
- Firefox shows four pages on print preview (fourth page is blank). Print command does not show number of pages. Prints four pages.
- Safari shows two pages on print preview and obviously breaks in the middle of address two. Print command does not show number of pages. Prints two pages.
Can PM/email playground if you wish.
-
Re: Multiple Ship-To Addresses [Support Thread]
Quote:
Originally Posted by
dbltoe
All on Windows 10 with order containing three separate delivery addresses.
- Chrome shows no print preview. Print command shows first to addresses on page one and third on page two. Prints two pages as shown in printer menu.
- Firefox shows four pages on print preview (fourth page is blank). Print command does not show number of pages. Prints four pages.
- Safari shows two pages on print preview and obviously breaks in the middle of address two. Print command does not show number of pages. Prints two pages.
Can PM/email playground if you wish.
Arggh, too many browsers with their own unique dialects! I've got this corrected on the plugin's GitHub repository (see this issue for the changes). Tested on IE, Chrome, FireFox and Safari; an order with 3 sub-orders properly prints 3 pages of packing slips on each.
I'll be getting this wrapped up for v1.2.0 of the Multiple Ship-To Addresses release. That release will drop support for Zen Cart versions prior to 1.5.5, allowing the plugin to make use of notifiers that are now included in the base and, thus, reducing the number of core-file overwrites required!
-
Re: Multiple Ship-To Addresses [Support Thread]
I just submitted v1.2.0 to the Zen Cart Plugins for review; I'll post back here once it's available for download.
-
Re: Multiple Ship-To Addresses [Support Thread]
v1.2.0 is now available for download from the Zen Cart plugins.
-
Re: Multiple Ship-To Addresses [Support Thread]
Let me start by saying that I've got this loaded on a 1.5.5e plain-jane site and it is working perfectly.
Not so much on the one I've been working on. I've got my brain so befuddled that I can't see whatever is staring me in the face.
One symptom was that the uninstall.sql was not completely removing the tables and configuration listings. Thought I had that fixed but, every time I removed and re-installed, the init_includes would not fire and setup the tables and configuration settings.
After finding a stray file, I got the init to fire but am getting
Code:
[13-Aug-2017 18:17:51 UTC] Request URI: /155e/index.php?main_page=checkout_process&zenid=b46jpej9kltq697nt61utm3u85, IP address: 216.177.186.199
#1 trigger_error() called at [/home/*****/public_html/155e/includes/classes/db/mysql/query_factory.php:167]
#2 queryFactory->show_error() called at [/home/*****/public_html/155e/includes/classes/db/mysql/query_factory.php:139]
#3 queryFactory->set_error() called at [/home/*****/public_html/155e/includes/classes/db/mysql/query_factory.php:266]
#4 queryFactory->Execute() called at [/home/*****/public_html/155e/includes/functions/functions_general.php:982]
#5 zen_db_perform() called at [/home/*****/public_html/155e/includes/classes/class.multiship.php:391]
#6 multiship->_createOrderAddAttributes() called at [/home/*****/public_html/155e/includes/classes/observers/class.multiship_observer.php:54]
#7 multiship_observer->update() called at [/home/*****/public_html/155e/includes/classes/class.base.php:103]
#8 base->notify() called at [/home/*****/public_html/155e/includes/classes/order.php:886]
#9 order->create_add_products() called at [/home/*****/public_html/155e/includes/modules/checkout_process.php:92]
#10 require(/home/*****/public_html/155e/includes/modules/checkout_process.php) called at [/home/*****/public_html/155e/includes/modules/pages/checkout_process/header_php.php:14]
#11 require(/home/*****/public_html/155e/includes/modules/pages/checkout_process/header_php.php) called at [/home/*****/public_html/155e/index.php:36]
[13-Aug-2017 18:17:51 UTC] PHP Fatal error: 1062:Duplicate entry '21644' for key 'PRIMARY' :: INSERT INTO orders_products_attributes (orders_products_attributes_id, orders_id, orders_products_id, products_options, products_options_values, options_values_price, price_prefix, product_attribute_is_free, products_attributes_weight, products_attributes_weight_prefix, attributes_discounted, attributes_price_base_included, attributes_price_onetime, attributes_price_factor, attributes_price_factor_offset, attributes_price_factor_onetime, attributes_price_factor_onetime_offset, attributes_qty_prices, attributes_qty_prices_onetime, attributes_price_words, attributes_price_words_free, attributes_price_letters, attributes_price_letters_free, products_options_id, products_options_values_id, products_prid) VALUES ('21644', '5715', '6801', 'Dry Roast', '1 Pound in Texas Container', '15.9500', '+', '1', '1.25', '+', '1', '1', '0.0000', '0.0000', '0.0000', '0.0000', '0.0000', '', '', '0.0000', '0', '0.0000', '0', '2', '11', '115:288e916535e8d251459de6dc1eaf0a39') ==> (as called by) /home/allpecans/public_html/155e/includes/functions/functions_general.php on line 982 <== in /home/*****/public_html/155e/includes/classes/db/mysql/query_factory.php on line 167
In case you need to "play" with this, I'll PM the details.
Thanks for looking
-
Re: Multiple Ship-To Addresses [Support Thread]
@dbltoe, that's weird; I've looked at the uninstall and compared it to the MultiShip initialization and don't see anything that gets added during initialization that's not removed after "uninstall".
That said, I do see that the storefront observer isn't checking to see if the plugin's been installed on the admin-side; I'll add that check to help prevent some of those issues in the future.
-
Re: Multiple Ship-To Addresses [Support Thread]
I'm still looking at the processing surrounding that debug-log ... something's (obviously) funny.
-
Re: Multiple Ship-To Addresses [Support Thread]
When I do it, I do it up brown:cool:
-
Re: Multiple Ship-To Addresses [Support Thread]
@dbltoe, I've updated /includes/classes/class.multiship.php on your test site, adding the highlighted line below. Does that correct the issue?
Code:
// -----
// Called by the multiship_observer class upon receipt of NOTIFY_ORDER_DURING_CREATE_ADDED_ATTRIBUTE_LINE_ITEM
// (issued by the order class).
//
public function _createOrderAddAttributes($products_attributes_array)
{
if ($this->selected) {
unset($products_attributes_array['orders_products_attributes_id']);
foreach ($this->orders_multiship_ids as $orders_products_id) {
$products_attributes_array['orders_products_id'] = $orders_products_id;
zen_db_perform(TABLE_ORDERS_PRODUCTS_ATTRIBUTES, $products_attributes_array);
}
}
}
-
Re: Multiple Ship-To Addresses [Support Thread]
Technically yes. By that, I mean that one would need to know what's going on to get to the multiple addresses. Knowing what the mod is supposed to do, I can go through the order process and successfully order, select different addresses, and get multiple packing slips that are correct. It's just some of the verbiage that might confuse the customer.
Since Multi does not work with One Page Checkout (OPC), the customer must go through the standard three-step checkout. Even one more, if actually using Multi, to confirm it all. So, here's the two situations.
Situation #1
When the customer selects Checkout, they are presented with Step 1 of 3 - Delivery Information. This is Shipping Information and the customer is told that their order will be shipped to the address on the left or they can change it by clicking on the Change Address button. Actually, if shipping to multiple addresses, any changes done here will need to be re-accomplished on Step 3 of 3 to accurately reflect the multiship addresses.
includes/languages/english/checkout_shipping, line #16, defines the text
Code:
Your order will be shipped to the address at the left or you may change the shipping address by clicking the <em>Change Address</em> button.
You can have the mod installer change the text in the core file, merge a changed file with the core, or place an override in includes/languages/english/YOUR_TEMPLATE/checkout_shipping.php. Any method would work with the override being simplest for newbie installers.
Suggested text:
If you are <em>only shipping to one address</em>, now is the time to make sure the address is correct. If you are shipping items to <em>multiple addresses</em>, those addresses will be entered in Step 3 of the checkout process.
Situation #2
If the customer gets to Step 3 of checkout and realizes they need to buy additional items, increase a quantity or decrease a quantity a warning is triggered from includes/languages/english/extra_definitions/multiship_common.php. The warning is of two sentences. The first lets the customer know that the product was added, or increased/decreased in quantity and will ship to the Primary address. The second sentence of that warning is
Code:
You will have the opportunity to change this during the checkout process.
If this file is only called when multiple addresses are selected, perhaps the second sentence should be
Code:
You will have the opportunity to change this during Step 3 of the checkout process.
The warning correctly does not appear on a deletion of an item as the customer would not have to adjust a deleted shipping address.
-
Re: Multiple Ship-To Addresses [Support Thread]
There is a new error when trying to delete the test order.
Code:
[18-Aug-2017 19:17:23 UTC] Request URI: /******/orders.php?origin=index&page=1&&action=deleteconfirm, IP address: 216.177.186.199
#1 trigger_error() called at [/home/******/public_html/*ADMIN*/includes/classes/observers/class.multiship_admin_observer.php:122]
#2 multiship_observer->logError() called at [/home/******/public_html/*ADMIN*/includes/classes/observers/class.multiship_admin_observer.php:93]
#3 multiship_observer->update() called at [/home/******/public_html/includes/classes/class.base.php:103]
#4 base->notify() called at [/home/******/public_html/*ADMIN*/includes/functions/general.php:1538]
#5 zen_remove_order() called at [/home/******/public_html/*ADMIN*/orders.php:284]
[18-Aug-2017 19:17:23 UTC] PHP Fatal error: : Missing or invalid orders_id in notification params array. in /home/******/public_html/*ADMIN*/includes/classes/observers/class.multiship_admin_observer.php on line 122
-
Re: Multiple Ship-To Addresses [Support Thread]
Understood; I'll get three GitHub issues noted:
- The coding error that resulted in the database barf when the order includes a product with attributes.
- The coding error that resulted in the "new error" you reported.
- 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?
-
Re: Multiple Ship-To Addresses [Support Thread]
-
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.
-
Re: Multiple Ship-To Addresses [Support Thread]
:clap: That got it!
Take the rest of the day off. You deserve it.:hug:
-
Re: Multiple Ship-To Addresses [Support Thread]
Quote:
Originally Posted by
dbltoe
:clap: That got it!
Take the rest of the day off. You deserve it.:hug:
Yeah! Thanks for providing the test-area. I'll get those language changes packaged up in preparation for this plugin's update.
-
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'] . ' 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']; ?> x</td>
<td class="dataTableContent" valign="top"><?php echo $currentProduct['name']; ?>
I've tried several options with no joy.
Any assistance greatly appreciated.
-
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']; ?> x</td>
<td class="dataTableContent" valign="top"><?php echo $currentProduct['name']; ?>
<?php
-
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> <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>
-
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.
-
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
-
Re: Multiple Ship-To Addresses [Support Thread]
Regardless of hard-coding the height and width or placing them in the database as configurations, the line still retrieves only the DIR_WS_CATALOG (/) and DIR_WS_IMAGES (images). Beyond that - nothing.:frusty:
Code:
<table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr class="dataTableHeadingRow">
<!-- BOF Add Image 1 of 2 - dbltoe -->
<td class="dataTableHeadingContent">Image</td>
<!-- EOF Add Image 1 of 2 = dbltoe -->
<td class="dataTableHeadingContent" align="center">Qty</td>
<td class="dataTableHeadingContent"><?php echo TABLE_HEADING_PRODUCTS_MODEL; ?></td>
<td class="dataTableHeadingContent">Option(s)</td>
</tr>
<?php
foreach ($order->products as $currentProduct) {
if ($currentProduct['orders_multiship_id'] != $multiship_id) {
continue;
}
?>
<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']), 'Product Image', 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> <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>
<?php
}
?>
</table>
Any more thoughts? Works like a champ with standard packing slip.
-
Re: Multiple Ship-To Addresses [Support Thread]
Quote:
Originally Posted by
dbltoe
Regardless of hard-coding the height and width or placing them in the database as configurations, the line still retrieves only the DIR_WS_CATALOG (/) and DIR_WS_IMAGES (images). Beyond that - nothing.:frusty:
Code:
<table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr class="dataTableHeadingRow">
<!-- BOF Add Image 1 of 2 - dbltoe -->
<td class="dataTableHeadingContent">Image</td>
<!-- EOF Add Image 1 of 2 = dbltoe -->
<td class="dataTableHeadingContent" align="center">Qty</td>
<td class="dataTableHeadingContent"><?php echo TABLE_HEADING_PRODUCTS_MODEL; ?></td>
<td class="dataTableHeadingContent">Option(s)</td>
</tr>
<?php
foreach ($order->products as $currentProduct) {
if ($currentProduct['orders_multiship_id'] != $multiship_id) {
continue;
}
?>
<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']), 'Product Image', 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> <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>
<?php
}
?>
</table>
Any more thoughts? Works like a champ with standard packing slip.
My thought: I didn't pay enough attention to your original post.:blush: How about changing the highlighted section to reference the variable that's being used:
Code:
<!-- 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($currentProduct['id']), 'Product Image', IMAGE_ON_INVOICE_IMAGE_WIDTH, IMAGE_ON_INVOICE_IMAGE_HEIGHT); ?>
</td>
<!-- EOF Add Image 2 of 2 - dbltoe -->
-
Re: Multiple Ship-To Addresses [Support Thread]
:hug:
That did it!
Didn't occur to me that it might be a different variable than all the other packing slips.
THANX
-
Re: Multiple Ship-To Addresses [Support Thread]
It seems that we may be putting the cart before the horse as it were. Multi selects the shipping method then the addresses. There seems to be no way to add two items to the cart and send them to different addresses using different shipping methods.
Selecting UPS at first and then splitting the shipping with one going to a PO Box means we need to change to USPS.
Am I missing something here:lookaroun
-
Re: Multiple Ship-To Addresses [Support Thread]
Quote:
Originally Posted by
dbltoe
It seems that we may be putting the cart before the horse as it were. Multi selects the shipping method then the addresses. There seems to be no way to add two items to the cart and send them to different addresses using different shipping methods.
Selecting UPS at first and then splitting the shipping with one going to a PO Box means we need to change to USPS.
Am I missing something here:lookaroun
Nope, you're not missing anything. The plugin supports Multiple Ship-To Addresses, not (currently) Multiple Ship-To Methods.
I've noted the request in the plugin's GitHub repository: https://github.com/lat9/multiship/issues/31
-
Re: Multiple Ship-To Addresses [Support Thread]
THANX,
We would limit the shipping but USPS is so much more expensive when the item leaves Texas. Inside, we can get around dimensional weight.
After our rodeo road trip, I'll look further into the matter.
-
Re: Multiple Ship-To Addresses [Support Thread]
Latest of the most interesting.
allpecans.com
Site is 1.5.5f, php 5.6, Apache 3.10, MySQL 5.6.41 Initial Install not upgrade
No OPC of course.
Square, News Box Manager, Sitemap XML, Dynamic Price Updater, Magic Thumb, Monthly Sales, Display Log Files, Encrypted Master Password, Edit Orders, Captcha, USPS Shipping, Remember Me.
Don't think I left any out.
When a customer with multiple addresses goes to check out using, a credit card (Square) in Step 2, the option to multiship does NOT appear on step 3 of checkout.
If the customer selects money order in Step 2, the option to ship to multiple addresses is just fine.
Thought it might be the address format at first as one address had physical as street and PO Box as Address Line 2:. Tried different combinations and none would work with a credit card.
Then thought it might be that most of the customers were brought over from Magento, so I tried with a post-customer-move account with the same result.
Had only tested this with money/order prior to customer having a problem.
Thinking maybe a setting in includes/modules/pages/checkout_confirmation/header_php_checkout_confirmation_multiship.php.
Thoughts
-
Re: Multiple Ship-To Addresses [Support Thread]
@dbltoe, that's interesting behavior, which I can't explain at this time. The multi-ship addition to the standard checkout_confirmation page is a "simply" additional header file and a couple of changes to pull in content on the associated page-template.
Shoot me (via direct email) some credentials (FTP and admin) so that I can poke around a bit to see what's up.
-
Re: Multiple Ship-To Addresses [Support Thread]
Any more thoughts on this?
THANX
-
Re: Multiple Ship-To Addresses [Support Thread]
@dbltoe, not at this time; I might have more time over the weekend to investigate.
-
Re: Multiple Ship-To Addresses [Support Thread]
More information on the matter. Thoughts about the process.
First, apologies. Not sure I mentioned mod Order Delivery Date is loaded.
I've found that the option to multi-ship does not appear for PayPal as well as Square. Only money order allows the option to appear.
Regardless of payment method, the shopping cart is reacting as it should. Tells the customer that single goes to primary and multiples may be sent to multiple addresses.
With money order as the example, if only one item in the cart, it correctly does not show the multi-ship option. If more than one item in the cart, it does show the multi-ship option.
PayPal from the shopping cart page does come back for shipping but does not offer multi-ship for multiple items.
Square stays on site of course, but also does not offer multi-ship items.
Extrapolation leads to thought that whatever triggers the multi-ship option is not coming from PayPal or Square. OR... Order Delivery Date is munging something up.
It's the time of year that this site gets orders sent to multiple addresses. One car salesman sends to all who purchased this year.
-
Re: Multiple Ship-To Addresses [Support Thread]
If the PayPal method being used is PayPal Express Checkout (i.e. via the shortcut button), note that the payment method prohibits changing the shipping address; if the method is, instead, PayPal Payments Pro, the checkout_confirmation page is actually displayed via AJAX on the checkout_payment page.
In either case, that could be part of the issue. I don't remember if Square declares itself as a "collects payments on site" type of payment method, but if it does then that's the same base issue as PayPal Payments Pro.
-
Re: Multiple Ship-To Addresses [Support Thread]
@dbltoe, the issue is/was that the non-moneyorder payment methods weren't updated to include a multiple_shipping_addresses method. Looking through the readme, I see that I haven't included any instructions for that required update.
I'll get that readme updated for a follow-on release.
-
Re: Multiple Ship-To Addresses [Support Thread]
Thanks so much for your help. It is a little bit difficult to read the non-existing part of a readme file.:D Guess it's like my putts in golf. Better than 99% of the putts that don't make it to the hole fail to go in.
Seriously, :hug:for all you do for Zen Cart and the forum. Customer got $1500 order with 30 addresses shortly after your fix this morning.
-
Re: Multiple Ship-To Addresses [Support Thread]
No problems, @dbltoe. That's great news about the site!
-
Re: Multiple Ship-To Addresses [Support Thread]
Good Morning
allpecans is still going strong with the multiship. Site has been upgraded to 1.5.6c and we've made some changes aesthetically that I'll probably address on github. Really all minor but, the move to PHP 7.2 has created a problem with includes/modules/pages/account_history/header_php_account_history_multiship.php on line 10.
Code:
<?php// ---------------------------------------------------------------------------
// Part of the Multiple Shipping Addresses plugin for Zen Cart v1.5.5 and later
//
// Copyright (C) 2014-2017, Vinos de Frutas Tropicales (lat9)
//
// @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
// ---------------------------------------------------------------------------
//
if (count($accountHistory) > 0) {
foreach ($accountHistory as &$currentOrder) {
$check = $db->Execute(
"SELECT o.order_total FROM " . TABLE_ORDERS_MULTISHIP . " om
INNER JOIN " . TABLE_ORDERS . " o
ON o.orders_id = om.orders_id
WHERE om.orders_id = " . $currentOrder['orders_id'] . "
LIMIT 1"
);
if (!$check->EOF) {
$currentOrder['order_name'] = MULTISHIP_MULTIPLE_ADDRESSES;
$currentOrder['order_total'] = $check->fields['order_total'];
}
}
}
I've spent the morning trying to learn about 7.2's change for count and recursive versus plain count or https://www.php.net/manual/en/function.count.php and none of my trials seem to work. I figure you'll do your usual and get the right combo as soon as you see it.
THANX for your help and work with Zen Cart.
-
Re: Multiple Ship-To Addresses [Support Thread]
Quote:
Originally Posted by
dbltoe
Good Morning
allpecans is still going strong with the multiship. Site has been upgraded to 1.5.6c and we've made some changes aesthetically that I'll probably address on github. Really all minor but, the move to PHP 7.2 has created a problem with includes/modules/pages/account_history/header_php_account_history_multiship.php on line 10.
Code:
<?php
// ---------------------------------------------------------------------------
// Part of the Multiple Shipping Addresses plugin for Zen Cart v1.5.5 and later
//
// Copyright (C) 2014-2017, Vinos de Frutas Tropicales (lat9)
//
// @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
// ---------------------------------------------------------------------------
//
if (count($accountHistory) > 0) {
foreach ($accountHistory as &$currentOrder) {
$check = $db->Execute(
"SELECT o.order_total FROM " . TABLE_ORDERS_MULTISHIP . " om
INNER JOIN " . TABLE_ORDERS . " o
ON o.orders_id = om.orders_id
WHERE om.orders_id = " . $currentOrder['orders_id'] . "
LIMIT 1"
);
if (!$check->EOF) {
$currentOrder['order_name'] = MULTISHIP_MULTIPLE_ADDRESSES;
$currentOrder['order_total'] = $check->fields['order_total'];
}
}
}
I've spent the morning trying to learn about 7.2's change for count and recursive versus plain count or
https://www.php.net/manual/en/function.count.php and none of my trials seem to work. I figure you'll do your usual and get the right combo as soon as you see it.
THANX for your help and work with Zen Cart.
Unfortunately, the $accountHistory array is created by the as-shipped header_php.php only if a customer has placed orders. Line 10 needs to be updated as described below:
Code:
<?php
// ---------------------------------------------------------------------------
// Part of the Multiple Shipping Addresses plugin for Zen Cart v1.5.5 and later
//
// Copyright (C) 2014-2017, Vinos de Frutas Tropicales (lat9)
//
// @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
// ---------------------------------------------------------------------------
//
if (!empty($accountHistory) && is_array($accountHistory)) {
foreach ($accountHistory as &$currentOrder) {
$check = $db->Execute(
"SELECT o.order_total FROM " . TABLE_ORDERS_MULTISHIP . " om
INNER JOIN " . TABLE_ORDERS . " o
ON o.orders_id = om.orders_id
WHERE om.orders_id = " . $currentOrder['orders_id'] . "
LIMIT 1"
);
if (!$check->EOF) {
$currentOrder['order_name'] = MULTISHIP_MULTIPLE_ADDRESSES;
$currentOrder['order_total'] = $check->fields['order_total'];
}
}
}
-
Re: Multiple Ship-To Addresses [Support Thread]
:hug:
Was looking at the empty but couldn't see the comparison between the example and the code.
Off to find out why Square is bombing today. Certainly NOT OPC.
THANX
-
Re: Multiple Ship-To Addresses [Support Thread]
Another odd item has reared its head on the pecan site. Still not using OPC
It's taken me a week to duplicate what is happening and it is multiship reporting to PayPal.
Three things have to happen:
- All items are taxable in Texas based on shipping
- Four different addresses -- one not taxable - three taxable
- must be in order non-tax, tax, tax, tax
In Step 3 of 3, a review will show
Attachment 19304
All amounts in this image are correct.
However, when presented to PayPal, the system tells PayPal that the tax is zero.
PayPal refuses the transaction because it sees taxable addresses but no tax.
Square doesn't care and processes the correct charge.
Sorry I am unable to let you play at this time. Busy season for them.
This has only happened three times that we know of and the system has been set for notify on errors since the upgrade to 1.5.6c.
I know I'm leaving something out but, let me know if you need any info.
-
Re: Multiple Ship-To Addresses [Support Thread]
@dbltoe, if you could enable PayPal logging, rerun the failing case and send the associated PayPal logs to my direct email, that would give me something to work with.
-
Re: Multiple Ship-To Addresses [Support Thread]
Will do soon. Youngest daughter lost father-in-law to Covid and we are dealing with that. Will be a bit before I get back to the compound.
-
Re: Multiple Ship-To Addresses [Support Thread]
Still away but pecan guy says when multi placed with US addy first and Canada after, estimator shows only US postage. Lost $30 shipping on order to US & Canada.
May be relatted with tax?
-
Re: Multiple Ship-To Addresses [Support Thread]
beginning to get foreacch() errors on line 388 of admin/inncludes/functions/html_output.php at line 388
Current code for lines 387-393
Code:
foreach ($values as $value) {
$field .= '<option value="' . zen_output_string($value['id']) . '"';
if ($default == $value['id']) {
$field .= ' selected="selected"';
}
Real busy time of the year for these folks. I wss wondering if he following code would fix the problem
Code:
if (is_array($values) || is_object($values))
foreach ($value as $value) {
$field .= '<option value="' . zen_output_string($value['id']) . '"';
if ($default == $value['id']) {
$field .= ' selected="selected"';
}
THANX
-
Re: Multiple Ship-To Addresses [Support Thread]
The "fix" is to find who is calling that function with a non-array value, not to put sticking plasters everywhere an interface error could occur. Surely, the log includes a trace of 'who' called zen_draw_pull_down_menu with those invalid parameters.
-
Re: Multiple Ship-To Addresses [Support Thread]
Maybe this will help. Making no sense to me.:dontgetit
1.5.7d
PHP 7.4
News Box
Dynamic Price Updater
OPC
Access Blocker
Sales Report
Mod List
Clone
Code:
[14-Dec-2022 00:09:48 UTC] Request URI: /GusBallp/index.php?cmd=orders&oID=5316&action=edit, IP address: 108.197.89.49
#1 zen_draw_pull_down_menu() called at [/GusBallp/includes/classes/observers/class.multiship_admin_observer.php:209]
#2 multiship_observer->addMultiShipStatusFields() called at [/GusBallp/includes/classes/observers/class.multiship_admin_observer.php:152]
#3 multiship_observer->update() called at [/includes/classes/class.base.php:118]
#4 base->notify() called at [/GusBallp/orders.php:1001]
#5 require(/GusBallp/orders.php) called at [/GusBallp/index.php:11]
--> PHP Warning: Invalid argument supplied for foreach() in /GusBallp/includes/functions/html_output.php on line 388.
[14-Dec-2022 00:09:48 UTC] Request URI: /GusBallp/index.php?cmd=orders&oID=5316&action=edit, IP address: 108.197.89.49
#1 zen_draw_pull_down_menu() called at [/GusBallp/includes/classes/observers/class.multiship_admin_observer.php:209]
#2 multiship_observer->addMultiShipStatusFields() called at [/GusBallp/includes/classes/observers/class.multiship_admin_observer.php:152]
#3 multiship_observer->update() called at [/includes/classes/class.base.php:118]
#4 base->notify() called at [/GusBallp/orders.php:1001]
#5 require(/GusBallp/orders.php) called at [/GusBallp/index.php:11]
--> PHP Warning: Invalid argument supplied for foreach() in /GusBallp/includes/functions/html_output.php on line 388.
[14-Dec-2022 00:09:48 UTC] Request URI: /GusBallp/index.php?cmd=orders&oID=5316&action=edit, IP address: 108.197.89.49
#1 zen_draw_pull_down_menu() called at [/GusBallp/includes/classes/observers/class.multiship_admin_observer.php:209]
#2 multiship_observer->addMultiShipStatusFields() called at [/GusBallp/includes/classes/observers/class.multiship_admin_observer.php:152]
#3 multiship_observer->update() called at [/includes/classes/class.base.php:118]
#4 base->notify() called at [/GusBallp/orders.php:1001]
#5 require(/GusBallp/orders.php) called at [/GusBallp/index.php:11]
--> PHP Warning: Invalid argument supplied for foreach() in /GusBallp/includes/functions/html_output.php on line 388.