Multi_Vendor_Shipping new thread
#3841
Posted 12 November 2009, 19:53
One last detail... when clicking the line item PackingSlip link that goes to vendors_packingslip.php, the Qty, Product, and Model are not appearing. The osc packingslip is ok.
Otherwise all seem good. Thank you again.
#3842
Posted 13 November 2009, 17:05
in admin/orders.php
// MVS start
// echo '<br> the $order->orders_shipping_id : ' . $order->orders_shipping_id;
if (tep_not_null($order->orders_shipping_id)) {
require_once ('vendor_order_info.php');
} else {
// MVS end
which sends me to /vendor_order_info.php
placing at the top
print '<pre>'; print_r ($order->products); print '</pre>';
Output
Array
(
[0] => Array
(
[Vid] => 1
[Vname] => My Store
[Vmodule] => item
[Vmethod] => Best Way
[Vcost] => 3.5000
[Vship_tax] => 0.0000
[Vorder_sent] => no
[Vnoname] => Shipper
[spacer] => -
[orders_products] => Array
(
[0] => Array
(
[qty] => 1
[name] => Speed 2: Cruise Control
[tax] => 0.0000
[model] => DVD-SPEED2
[price] => 42.0000
[vendor_name] =>
[vendor_ship] =>
[shipping_method] =>
[shipping_cost] =>
[final_price] => 42.0000
[spacer] => -
)
)
)
)
Within vendor_order_info is the link to the vendor_packingslip
echo ' <tr class="dataTableRow">' . "\n" .
' <td class="dataTableContent" valign="top">' . $order->products[$l]['Vname'] . '<br>' . $ship_data_text . '<br><a href="' . tep_href_link('vendor_packingslip.php', 'oID=' . $oID . '&vID=' . $order->products[$l]['Vid'] . '&text=' . $ship_data_text) . '">' . tep_image_button('button_packingslip.gif', IMAGE_ORDERS_PACKINGSLIP) . '</a></td>' . "\n";
the link shows as
http://www.xxx/admin/vendor_packingslip.php?oID=33&vID=1&text=Shipment Number 1 of 1
looking to the /admin/vendors_packingslip.php there is this code
$package_num = sizeof ($order->products);
$box_num = $l +1;
for ($i = 0, $n = sizeof ($packslip_products); $i < $n; $i++) {
echo ' <tr class="dataTableRow">' . "\n" .
' <td class="dataTableContent" valign="top" align="left">' . $packslip_products[$i]['qty'] . ' x ' . $packslip_products[$i]['name'];
if (isset ($packslip_products[$i]['packslip_attributes']) && (sizeof($packslip_products[$i]['packslip_attributes']) > 0)) {
for ($j = 0, $k = sizeof($packslip_products[$i]['packslip_attributes']); $j < $k; $j++) {
echo '<br><nobr><small> <i> - ' . $packslip_products[$i]['packslip_attributes'][$j]['option'] . ': ' . $packslip_products[$i]['packslip_attributes'][$j]['value'];
echo '</i></small></nobr>';
}
}
echo '</td>' .
' <td class="dataTableContent" valign="top" align="left">' . $packslip_products[$i]['spacer'] . '</td>' . "\n" .
' <td class="dataTableContent" valign="top">' . $packslip_products[$i]['spacer'] . '</td>' . "\n" .
' <td class="dataTableContent" valign="top">' . $packslip_products[$i]['model'] . '</td>' . "\n" .
' </tr>' . "\n";
}
Where do I go from here? Im lost. Another priceformatter class side effect?
Thank you for the help.
#3843
Posted 13 November 2009, 17:52
Regards
Jim
#3844
Posted 13 November 2009, 18:16
Before we made the fix to includes/classes/shopping_cart.php, the items were showing up in vendors_packingslip, although all items were showing and not just that vendors specific items (expected, with vID missing). after the fix, no items appear.
The queries in admin/vendor_packingslip.php
above HEAD
$orders_query = tep_db_query("select orders_id from " . TABLE_ORDERS . " where orders_id = '" . (int) $oID . "'");
and within BODY
<?php
$index = 0;
$order_packslip_query = tep_db_query("select vendors_id, orders_products_id, products_name, products_model, products_price, products_tax, products_quantity, final_price from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int) $oID . "' and vendors_id = '" . $vID . "'");
while ($order_packslip_data = tep_db_fetch_array($order_packslip_query)) {
$packslip_products[$index] = array (
'qty' => $order_packslip_data['products_quantity'],
'name' => $order_packslip_data['products_name'],
'model' => $order_packslip_data['products_model'],
'tax' => $order_packslip_data['products_tax'],
'price' => $order_packslip_data['products_price'],
'final_price' => $order_packslip_data['final_price']
);
$subindex = 0;
$packslip_attributes_query = tep_db_query("select products_options, products_options_values, options_values_price, price_prefix from " . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . " where orders_id = '" . (int) $oID . "' and orders_products_id = '" . (int) $order_packslip_data['orders_products_id'] . "'");
if (tep_db_num_rows($packslip_attributes_query)) {
while ($packslip_attributes = tep_db_fetch_array($packslip_attributes_query)) {
$packslip_products[$index]['packslip_attributes'][$subindex] = array (
'option' => $packslip_attributes['products_options'],
'value' => $packslip_attributes['products_options_values'],
'prefix' => $packslip_attributes['price_prefix'],
'price' => $packslip_attributes['options_values_price']
);
$subindex++;
}
}
$index++;
}
?>
Where would a $vendors_query go? if that is what you are referring to
#3845
Posted 13 November 2009, 18:33
$oID = tep_db_prepare_input($HTTP_GET_VARS['oID']);
$orders_query = tep_db_query("select orders_id from " . TABLE_ORDERS . " where orders_id = '" . (int) $oID . "'");
and change it to this:$oID = (int) $_GET['oID']; $vID = (int) $_GET['vID'];Let me know if that helps.
Regards
Jim
#3846
Posted 13 November 2009, 18:35
Edited by Roaddoctor, 13 November 2009, 18:35.
#3847
Posted 13 November 2009, 18:42
that did it. Thank you!
Hopefully
#3848
Posted 13 November 2009, 18:51
Regards
Jim
#3849
Posted 13 November 2009, 19:35
I believe your line 147 is unnescessary and causes a column offset issue. in IE at least, havent tried others. please confirm, or correct me.
Thanks!
#3850
Posted 13 November 2009, 20:01
Regards
Jim
#3851
Posted 15 November 2009, 03:07
Regards
Jim
#3852
Posted 19 November 2009, 13:29
I have 4 vendors set up. One of these uses Royal Mail First, Second and Special delivery methods (so 3 methods installed on the vendor). My weight limit for first class is 1.5kg. If a customer orders 2kg worth of stuff then it would have to go Special Delivery. On the delivery page of checkout first class still shows up with a £0.00 price and is clickable. This means that the customer can select first class and get free postage. Is there a fix for this??
Another thing that I would like MVS to do is if a customer buys a big product from me which costs £200 to deliver but also orders some small items, then the large shipping costs swallows up the small one. I.e. customer orders £3000 product with £200 deliver. They also order 3 small products £30 total with £3 delivery. Total cost £3030 with only £200 delivery and not £203. Is this possible?
Many thanks
#3853
Posted 19 November 2009, 18:18
2. There is currently no way to do this. It would be difficult to implement if the charges are from different "vendors."
Regards
Jim
#3854
Posted 19 November 2009, 19:44
Does that make sense??
Edited by Tartan Barty, 19 November 2009, 19:46.
#3855
Posted 19 November 2009, 19:51
Regards
Jim
#3856
Posted 24 November 2009, 21:55
The other parts seem to work. The vendors I added before there was this problem seem to also work for shipping estimates and all, but manage page does not show installed modules too. I checked the configuration table and it seems to be intact as well.
Edited by psychoder, 24 November 2009, 21:56.
#3857
Posted 24 November 2009, 22:16
Regards
Jim
#3858
Posted 24 November 2009, 23:13
kymation, on 24 November 2009, 22:16, said:
Regards
Jim
I have a bunch of contributions installed, but I did not add a new shipping module. the new contributions I added have nothing to do with vendors or shipping, I added some search enhancement, some category tools. I do not think I modified any related files as well. But I added new vendors, and I am trying to insert shipping module information for that thats when I noticed this problem.
Edited by psychoder, 24 November 2009, 23:14.
#3859
Posted 24 November 2009, 23:32
Regards
Jim
#3860
Posted 25 November 2009, 15:43
kymation, on 24 November 2009, 23:32, said:
Regards
Jim
if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) {
echo ' <td width="25%" valign="top">' . "\n";
$box = new box;
echo $box->infoBox($heading, $contents);
echo ' </td>' . "\n";
}
?>
</tr>
</table></td>
</tr>
</table></td>
<!-- body_text_eof //-->
</tr>
</table>
<!-- body_eof //-->
<!-- footer //-->
<?php require_once(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require_once(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
This is the part where it prints the right manage box,the previous lines adds the install button etc. As I mentioned before this file is just same as the file that came with the package...
While searching on google, I came across something mentioning manage button not working with some contribution called multiple admins. I do not have that contribution but I do have a second admin on the website which I added recently. Was wondering if there would be a problem because of the admin rights?














