Is there a way to add a product id number to a product (for example E-MED-1234) and make it follow the product into shopping basket and order emails? (Also to be sendt with the 'send order to client' plugin) The only way now is to write the number in the product name and that si not a good looking solution
From my experience I can conclude the changes would have to be more extensive than you perhaps think but they probably would be all in just one file, core/orders.php I think several function would have to be changed. This is a specialized work, more of a hack I guess, though.
Hi, i solved it as follows: in the file: /core/orders.php in the function: addToBasket there is a line like this: fwrite( $rFile, $iOrder.'$'.$iProduct.'$'.$iQuantity.'$'.$oProduct->aProducts[$iProduct]['fPrice'].'& #36;'.$oProduct->aProducts[$iProduct]['sName'].'$'.$oProduct->aProducts[$iProduct]['fMass'].'& #36;'."\n" );
Directly between the bracket ] and dott . of the ...aProducts[$iProduct]['sName']HERE!!!. i wrote: .'-'.$oProduct->aProducts[$iProduct]['iProduct']
So it lokks now: fwrite( $rFile, $iOrder.'$'.$iProduct.'$'.$iQuantity.'$'.$oProduct->aProducts[$iProduct]['fPrice'].'& #36;'.$oProduct->aProducts[$iProduct]['sName'].'-'.$oProduct->aProducts[$iProduct]['iProduct'].' 36;'.$oProduct->aProducts[$iProduct]['fMass'].'$'."\n" );
This construct: '-' at the beginning you can vary (e.g. ' - ' or another characters) to format the "distance" between the product name and its number. This solution is only for the basket, order form and email. You cannot (with this solution) see the number in the customer product list. If you want to show the number to customer (buyer) so add in the /templates/pages_default.tpl in the block: BEGIN_PRODUCTS_LIST after the: $aData[sName] this: $aData[iProduct] You can use the ' - ' separators as well.
Hi and thanks for the suggestions. The above solution worked but was not really what I was looking for. I tend to agree with beholder that my wishes requires more of an extensive hack. It would really require an extra 'product number' field in admin that could be edited with the product and carried through product page into shopping basket and into order and emails.
Is there a way to do this?
Or - is there a way to make the existing short description follow the product name into the basket, order and emails? This would solve my problem for now