Re: Super Orders v3.0 Support Thread
Quote:
Originally Posted by
DivaVocals
Ahhh.. Will have to have a looksee.. So the attributes are lined up horizontally next to the model number??
The new multiple attributes code i have from the original contributor created arranges the attributes on the PDF Packingslip as follows:
yep - lined up horizontally - as my changes made the rows a bit higher, i tried to make each row take up as little height as possible - line returns equal paper wasted. that, and i'm O/C (not the lightswitch-flicking, doorknob-wiping variety though...more perfection and symmetry :P ) - single words on their own line just doesn't sit right with me, for whatever reason i don't really know.
feel free to play round with my bits of code, or if you think of something else to add to my list of mods to work on, let me know and i'll give it a shot!
Re: Super Orders v3.0 Support Thread
Hey fo0bar,
I tested the multiple attributes support this afternoon, and it's not functioning as expected under all circumstances. While the circumstances under which it's gone wonky are not common, they could occur in a live store - and therefore the modifications must be able to handle them if they are to be included in a release of SO3.
Also, I discovered an issue with the modification that moves order numbers to the right.
Can you PM me your email address so I can send screen shots of the details? For whatever reason, I'm not able to post images to the forum successfully.
Diva wants to submit the newest SO3 update this weekend, so if the necessary changes are something you can make quickly, they can be included in the next release. If not, we'll hold off until the following release.
Lastly, the reason for needing vertical listing of multiple attributes (vs. the paper saving horizontal method) is that if there are long product and/or attribute names, they get truncated when formatted horizontally. Therefore, vertical formatting is necessary.
Having said that, if you personally prefer to use horizontal formatting, you should by all means do so. But is vertical formatting something you'd be able to work out for inclusion in the SO3 update release?
Quote:
Originally Posted by
fo0bar
yep - lined up horizontally - as my changes made the rows a bit higher, i tried to make each row take up as little height as possible - line returns equal paper wasted. that, and i'm O/C (not the lightswitch-flicking, doorknob-wiping variety though...more perfection and symmetry :P ) - single words on their own line just doesn't sit right with me, for whatever reason i don't really know.
feel free to play round with my bits of code, or if you think of something else to add to my list of mods to work on, let me know and i'll give it a shot!
Re: Super Orders v3.0 Support Thread
Quote:
Originally Posted by
ScriptJunkie
Hey fo0bar,
I tested the multiple attributes support this afternoon, and it's not functioning as expected under all circumstances. While the circumstances under which it's gone wonky are not common, they could occur in a live store - and therefore the modifications must be able to handle them if they are to be included in a release of SO3.
Also, I discovered an issue with the modification that moves order numbers to the right.
Can you PM me your email address so I can send screen shots of the details? For whatever reason, I'm not able to post images to the forum successfully.
Diva wants to submit the newest SO3 update this weekend, so if the necessary changes are something you can make quickly, they can be included in the next release. If not, we'll hold off until the following release.
Lastly, the reason for needing vertical listing of multiple attributes (vs. the paper saving horizontal method) is that if there are long product and/or attribute names, they get truncated when formatted horizontally. Therefore, vertical formatting is necessary.
Having said that, if you personally prefer to use horizontal formatting, you should by all means do so. But is vertical formatting something you'd be able to work out for inclusion in the SO3 update release?
eep! i'm happy to continue working on it to make it a cover-all. i'll be PMing you my email address right away. I was *just* looking over my code and did notice that i hadn't done it *perfectly* to accommodate not having any attributes, but in my particular test it seems fine.
And yes - i'm absolutely more than happy to work out a bit of code to make the attribs display vertically - this isn't much work at all :D
Re: Super Orders v3.0 Support Thread
Great! I'll go check my PM and email you right away :)
Quote:
Originally Posted by
fo0bar
eep! i'm happy to continue working on it to make it a cover-all. i'll be PMing you my email address right away. I was *just* looking over my code and did notice that i hadn't done it *perfectly* to accommodate not having any attributes, but in my particular test it seems fine.
And yes - i'm absolutely more than happy to work out a bit of code to make the attribs display vertically - this isn't much work at all :D
Re: Super Orders v3.0 Support Thread
Quote:
Originally Posted by
ScriptJunkie
Hey fo0bar,
I tested the multiple attributes support this afternoon, and it's not functioning as expected under all circumstances. While the circumstances under which it's gone wonky are not common, they could occur in a live store - and therefore the modifications must be able to handle them if they are to be included in a release of SO3.
Also, I discovered an issue with the modification that moves order numbers to the right.
Can you PM me your email address so I can send screen shots of the details? For whatever reason, I'm not able to post images to the forum successfully.
Diva wants to submit the newest SO3 update this weekend, so if the necessary changes are something you can make quickly, they can be included in the next release. If not, we'll hold off until the following release.
Lastly, the reason for needing vertical listing of multiple attributes (vs. the paper saving horizontal method) is that if there are long product and/or attribute names, they get truncated when formatted horizontally. Therefore, vertical formatting is necessary.
Having said that, if you personally prefer to use horizontal formatting, you should by all means do so. But is vertical formatting something you'd be able to work out for inclusion in the SO3 update release?
Done. All issues fixed (including vertical attributes!), after basically rewriting the entire function. :frusty:
ScriptJunkie, I'll be emailing you a copy of the updated file so you can test it and see if it's functional and suitable for your cart. I think (read:hope) it'll be perfect for what you want. Diva, I'd send it to you but i don't have your email. PM me if you'd like me to email it to you.
for anyone else who wants to try this code:
1. BACK UP BACK UP BACK UP
2. open admin/includes/functions/extra_functions/lcsd_merged_packing_slips.php in a text editor.
3. find the following line:
PHP Code:
function draw_packing_slip_master_list_customer($orderArray, &$pdf){
select that line, and EVERYTHING UNTIL (but NOT including this line:
PHP Code:
function lcsd_merged_packingslips($selected_oids, $merge_selected_oids){
remember, do NOT select that line.
replace everything you've selected in the steps above, with this:
PHP Code:
function draw_packing_slip_master_list_customer($orderArray, &$pdf){
$order = $orderArray[0];
$customerName = $order->delivery['name'];
if($order->delivery['street_address'] == ''){ /* this is to match the merged packingslips record */
$customerName = $order->customer['name'];
}
$totalQty = 0;
foreach($orderArray as $order){
for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {
$totalQty = $totalQty + $order->products[$i]['qty'];
}
}
if ($totalQty == 1){
$headingLine = $customerName . ' (' . $totalQty . ' piece)';
}
else{
$headingLine = $customerName . ' (' . $totalQty . ' pieces)';
}
//sort out the header address line
$shipTo = zen_address_format($order->delivery['format_id'], $order->delivery, 0, '', "\n");
if($order->delivery['street_address'] == ''){
$shipTo = zen_address_format($order->customer['format_id'], $order->customer, 0, '', "\n");
}
$orderRightBox = $shipTo;
$pdf->SetFontSize('6');
$pdf->Cell('580','10',$orderRightBox,'','','R');
$pdf->Line(18,$pdf->GetY(),594,$pdf->GetY());
$pdf->Ln(2);
$pdf->SetFontSize('10');
$pdf->Cell(10, 10, '', 'LRTB');
$pdf->Cell(200, 12, $headingLine,'','0');
$pdf->Ln(10);
$pdf->MultiCell(566,2,'');
foreach($orderArray as $order){
$orderText = '';
for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {
if ($orderText != ''){
$orderText = '';
}
$pdf->Ln(4);
$pdf->Cell(27, 10, '');
$pdf->Cell(8, 8, '', 'LRTB');
$pdf->Cell(5, 0, '');
$pdf->SetFontSize('6');
$multiAtt = false;
if(sizeof($order->products[$i]['attributes']) >0){
$attribCount=(sizeof($order->products[$i]['attributes']));
if($attribCount>1){
$aC=0;
while($aC < $attribCount){
$attribText = ' - ' . $order->products[$i]['attributes'][$aC]['value'];
if($aC==0){
$orderText .= ' ' . $order->products[$i]['qty'] . 'x ' . $order->products[$i]['name'] . '/' . $order->products[$i]['model'] . $attribText;
$pdf->Cell(380,10,$orderText,0,0);
$dateId = zen_date_short($order->info['date_purchased']) . ' #' . $order->info[id];
$pdf->SetFontSize('10');
$pdf->Cell('140','10',$dateId,'0','1','R');
$multiAtt=true;
$pdf->SetFontSize('6');
}else{
$widthTest = (' ' . $order->products[$i]['qty'] . 'x ' . $order->products[$i]['name'] . '/' . $order->products[$i]['model']);
$spaceWidth = $pdf->GetStringWidth($widthTest) + 40;
$orderText = $attribText;
$pdf->Ln(0);
$pdf->Cell($spaceWidth,10,'');
$pdf->Cell(20,12,$orderText,0,0);
}
$aC++;
}
}else{
$attribText = (!$order->products[$i]['attributes'][0]['value']) ? '' : (' - ' . $order->products[$i]['attributes'][0]['value']) ;
$orderText .= ' ' . $order->products[$i]['qty'] . 'x ' . $order->products[$i]['name'] . '/' . $order->products[$i]['model'] . $attribText;
$pdf->Cell(380,10,$orderText);
}
}else{
$orderText .= ' ' . $order->products[$i]['qty'] . 'x ' . $order->products[$i]['name'] . '/' . $order->products[$i]['model'];
$pdf->Cell(380,10,$orderText);
}
$attribText = '' ;
$orderIdText = $order->info[id];
if ($orderIdText == $previousOrderId){
$pdf->MultiCell('580','10',' ','','','R');
}else{
if (!$multiAtt){
$pdf->SetFontSize('10');
$dateId = zen_date_short($order->info['date_purchased']) . ' #' . $order->info[id];
$pdf->Cell('140','10',$dateId,'0','1','R');
$pdf->Ln(0);
$previousOrderId = $order->info[id];
}
}
}
$pdf->Ln(8);
}
}
Again, I hope this helps.
Re: Super Orders v3.0 Support Thread
Hi Diva
Any chance of you adding a heading and dashed underline immediately above the customer comments of the email output in the next release.
eg line 226 and elsewhere in admin\includes\functions\extra_functions\common_orders_functions.php
TABLE_HEADING_COMMENTS . "\n" . EMAIL_SEPARATOR . "\n" . strip_tags($notify_comments) .
Thanks in advance
Re: Super Orders v3.0 Support Thread
The upcoming release is going to be eliminating the need for this function file at all as I have "synchronized" and "reconciled" the comments code from Super Orders with the default comments code used in orders.php. (doing the same for Edit Orders as well)
Doing so will make any future changes with comments in Zen Cart easier to incorporate into Super Orders (and Edit Orders)
Quote:
Originally Posted by
dw08gm
Hi Diva
Any chance of you adding a heading and dashed underline immediately above the customer comments of the email output in the next release.
eg line 226 and elsewhere in admin\includes\functions\extra_functions\common_orders_functions.php
TABLE_HEADING_COMMENTS . "\n" . EMAIL_SEPARATOR . "\n" . strip_tags($notify_comments) .
Thanks in advance
Re: Super Orders v3.0 Support Thread
and so I'm CLEAR, these are changes to the PDF "Master list of packing slips" correct??:smile:
Quote:
Originally Posted by
fo0bar
Done. All issues fixed (including vertical attributes!), after basically rewriting the entire function. :frusty:
ScriptJunkie, I'll be emailing you a copy of the updated file so you can test it and see if it's functional and suitable for your cart. I think (read:hope) it'll be perfect for what you want. Diva, I'd send it to you but i don't have your email. PM me if you'd like me to email it to you.
for anyone else who wants to try this code:
1. BACK UP BACK UP BACK UP
2. open
admin/includes/functions/extra_functions/lcsd_merged_packing_slips.php in a text editor.
3. find the following line:
PHP Code:
function draw_packing_slip_master_list_customer($orderArray, &$pdf){
select that line, and EVERYTHING UNTIL (
but NOT including this line:
PHP Code:
function lcsd_merged_packingslips($selected_oids, $merge_selected_oids){
remember, do
NOT select that line.
replace everything you've selected in the steps above, with this:
PHP Code:
function draw_packing_slip_master_list_customer($orderArray, &$pdf){
$order = $orderArray[0];
$customerName = $order->delivery['name'];
if($order->delivery['street_address'] == ''){ /* this is to match the merged packingslips record */
$customerName = $order->customer['name'];
}
$totalQty = 0;
foreach($orderArray as $order){
for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {
$totalQty = $totalQty + $order->products[$i]['qty'];
}
}
if ($totalQty == 1){
$headingLine = $customerName . ' (' . $totalQty . ' piece)';
}
else{
$headingLine = $customerName . ' (' . $totalQty . ' pieces)';
}
//sort out the header address line
$shipTo = zen_address_format($order->delivery['format_id'], $order->delivery, 0, '', "\n");
if($order->delivery['street_address'] == ''){
$shipTo = zen_address_format($order->customer['format_id'], $order->customer, 0, '', "\n");
}
$orderRightBox = $shipTo;
$pdf->SetFontSize('6');
$pdf->Cell('580','10',$orderRightBox,'','','R');
$pdf->Line(18,$pdf->GetY(),594,$pdf->GetY());
$pdf->Ln(2);
$pdf->SetFontSize('10');
$pdf->Cell(10, 10, '', 'LRTB');
$pdf->Cell(200, 12, $headingLine,'','0');
$pdf->Ln(10);
$pdf->MultiCell(566,2,'');
foreach($orderArray as $order){
$orderText = '';
for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {
if ($orderText != ''){
$orderText = '';
}
$pdf->Ln(4);
$pdf->Cell(27, 10, '');
$pdf->Cell(8, 8, '', 'LRTB');
$pdf->Cell(5, 0, '');
$pdf->SetFontSize('6');
$multiAtt = false;
if(sizeof($order->products[$i]['attributes']) >0){
$attribCount=(sizeof($order->products[$i]['attributes']));
if($attribCount>1){
$aC=0;
while($aC < $attribCount){
$attribText = ' - ' . $order->products[$i]['attributes'][$aC]['value'];
if($aC==0){
$orderText .= ' ' . $order->products[$i]['qty'] . 'x ' . $order->products[$i]['name'] . '/' . $order->products[$i]['model'] . $attribText;
$pdf->Cell(380,10,$orderText,0,0);
$dateId = zen_date_short($order->info['date_purchased']) . ' #' . $order->info[id];
$pdf->SetFontSize('10');
$pdf->Cell('140','10',$dateId,'0','1','R');
$multiAtt=true;
$pdf->SetFontSize('6');
}else{
$widthTest = (' ' . $order->products[$i]['qty'] . 'x ' . $order->products[$i]['name'] . '/' . $order->products[$i]['model']);
$spaceWidth = $pdf->GetStringWidth($widthTest) + 40;
$orderText = $attribText;
$pdf->Ln(0);
$pdf->Cell($spaceWidth,10,'');
$pdf->Cell(20,12,$orderText,0,0);
}
$aC++;
}
}else{
$attribText = (!$order->products[$i]['attributes'][0]['value']) ? '' : (' - ' . $order->products[$i]['attributes'][0]['value']) ;
$orderText .= ' ' . $order->products[$i]['qty'] . 'x ' . $order->products[$i]['name'] . '/' . $order->products[$i]['model'] . $attribText;
$pdf->Cell(380,10,$orderText);
}
}else{
$orderText .= ' ' . $order->products[$i]['qty'] . 'x ' . $order->products[$i]['name'] . '/' . $order->products[$i]['model'];
$pdf->Cell(380,10,$orderText);
}
$attribText = '' ;
$orderIdText = $order->info[id];
if ($orderIdText == $previousOrderId){
$pdf->MultiCell('580','10',' ','','','R');
}else{
if (!$multiAtt){
$pdf->SetFontSize('10');
$dateId = zen_date_short($order->info['date_purchased']) . ' #' . $order->info[id];
$pdf->Cell('140','10',$dateId,'0','1','R');
$pdf->Ln(0);
$previousOrderId = $order->info[id];
}
}
}
$pdf->Ln(8);
}
}
Again, I hope this helps.
Re: Super Orders v3.0 Support Thread
Quote:
Originally Posted by
DivaVocals
and so I'm CLEAR, these are changes to the PDF "Master list of packing slips" correct??:smile:
Correct :)
I'll be beginning testing in the next few minutes :)
Re: Super Orders v3.0 Support Thread
Quote:
Originally Posted by
DivaVocals
and so I'm CLEAR, these are changes to the PDF "Master list of packing slips" correct??:smile:
you got it!
...i'm pretty keen to know how it tests - i'm slightly limited when it comes to testing this multiple attribute stuff in a live store :P