In one of my stores I have several products which can only be supplied if some conditions are being met.
It was necessary that a manufacturer specific message is being displayed on the shopping cart page if the cart contains a product from a given manufacturer.
I have only one manufacturer who requires one condition to be filled. That was easily solved by adding this to the tpl_shopping_cart_default.php page:
If a customer adds a product made by the manufacturer with id=1 then the message (call it message A) shows just fine.<!--bof prescriptive advice required alert -->
<div>
<?php
global $cart;
if ($_SESSION['cart']->in_cart_check('manufacturers_id','1')) {
echo TEXT_PRESCRIPTIVE_ADVICE_REQUIRED;
} //above returns true for prescriptive advice required
?>
</div>
<!--eof prescriptive advice required alert -->
Then there are several other manufacturers who's requirements are different from manufacturer 1 but they are all of a common nature.
I managed to display a message different to the one applicable to manufacturer 1 if (per say) a product made by manufacturer 2 is added to the cart by modifying the code above with another id and another define.
But - and here is my problem - what if the cart contains a product from manufacturers 2, 3 and 4 (all with the same conditional message to be displayed - let's call it message B)?
Is it possible to put 2,3 and 4 into an array covering manufacturers 2,3 and 4 regardless of which product from these manufacturers is in the cart?
To top it off, if the cart contains something from manufacturer 1 and also something from manufacturer 2, 3 or 4 then only message A needs to be shown - message B would be obsolete.
I have been stuffing around with this idea for most of the day with varying results, but none of my attempts were satisfactory.
Any ideas or pointers please?
TIA
Frank




