I have semi-successfully managed to edit the orderscript.pl so that additional variables are displayed in the customer emails.
#
# Add product line
#
MailOrderLine( $$pProduct{REFERENCE},
$$pProduct{NAME}. "\r\nLead Time: " . $$pProduct{"CUSTOMVARS"}{'LeadTime'}. "\r\nAvailable Ex Stock: " . $$pProduct{"CUSTOMVARS"}{'DeltaStock'},
$$pOrderDetail{QUANTITY},
$CurrentItem{'PRICE'},
$CurrentItem{'COST'},
$nDescriptionColumnWidth,
@TableFormat
);
But I want the same to happen to the component products but I keep getting 0 values displayed:
#
# Add component line
#
MailOrderLine( $pComponent->{'REFERENCE'},
$pComponent->{'NAME'}. "\r\nLead Time: " . $$pProduct{"CUSTOMVARS"}{'LeadTime'}. "\r\nAvailable Ex Stock: " . $$pProduct{"CUSTOMVARS"}{'DeltaStock'},
$pComponent->{'QUANTITY'},
$pComponent->{'PRICE'},
$pComponent->{'COST'},
$nDescriptionColumnWidth,
@TableFormat
);
If I use $pComponent here instead the script fails with a CGI Header error:
Mail email shows:
PA1AX CONCAVE HEAD Heavy spring 10 £1.61 £16.10
Lead Time: 0
Available Ex Stock: 0
PA1AS-012 REDUCED CONCAVE Light spring 1 £1.61 £1.61
Lead Time: 14
Available Ex Stock: 426
The first line is a component and the second a striaght forward product.
I guess I using the wrong $p...... but cannot get what I expect to be work.
Any ideas greatfully accepted.
Gilbo
#
# Add product line
#
MailOrderLine( $$pProduct{REFERENCE},
$$pProduct{NAME}. "\r\nLead Time: " . $$pProduct{"CUSTOMVARS"}{'LeadTime'}. "\r\nAvailable Ex Stock: " . $$pProduct{"CUSTOMVARS"}{'DeltaStock'},
$$pOrderDetail{QUANTITY},
$CurrentItem{'PRICE'},
$CurrentItem{'COST'},
$nDescriptionColumnWidth,
@TableFormat
);
But I want the same to happen to the component products but I keep getting 0 values displayed:
#
# Add component line
#
MailOrderLine( $pComponent->{'REFERENCE'},
$pComponent->{'NAME'}. "\r\nLead Time: " . $$pProduct{"CUSTOMVARS"}{'LeadTime'}. "\r\nAvailable Ex Stock: " . $$pProduct{"CUSTOMVARS"}{'DeltaStock'},
$pComponent->{'QUANTITY'},
$pComponent->{'PRICE'},
$pComponent->{'COST'},
$nDescriptionColumnWidth,
@TableFormat
);
If I use $pComponent here instead the script fails with a CGI Header error:
Mail email shows:
PA1AX CONCAVE HEAD Heavy spring 10 £1.61 £16.10
Lead Time: 0
Available Ex Stock: 0
PA1AS-012 REDUCED CONCAVE Light spring 1 £1.61 £1.61
Lead Time: 14
Available Ex Stock: 426
The first line is a component and the second a striaght forward product.
I guess I using the wrong $p...... but cannot get what I expect to be work.
Any ideas greatfully accepted.
Gilbo
Comment