We have a quote system by Miva which is scheduled for update I understand. I need to add a message to the page (request-quote) if any products with a specific prefix are in the order. So the customer adds items which include the prefix PROG- and when they click 'Request Quote and get the quote page they would see my message. I looked at the token list and various code blocks and worked up this, but don't get the message. I'm hoping someone can help move me in the right direction.
So in the request-quote page I added
and here are the relevant items from Token List that show on that page
Thanks.
Burt
So in the request-quote page I added
Code:
<!-- load prefix exception(s) //--> <mvt:assign name="g.product_exception_1" value="'PROG-'" /> <!-- flush variables //--> <mvt:assign name="g.product_exception_check_1" value="''" /> <mvt:assign name="g.product_exception_flag_1" value="''" /> <!-- load product code //--> <mvt:assign name="g.product_exception_check_1" value="substring(l.settings:item:product:code, 0, 5)" /> <!-- loop through product codes, compare 1st 5 code to exception //--> <mvt:foreach iterator="product" array="products"> <mvt:assign name="g.product_exception_check_1" value="substring(l.settings:item:product:code, 0, 5)" /> <mvt:if expr="g.product_exception_check_1 CIN g.product_exception_1"> <mvt:assign name="g.product_exception_flag_1" value="1" /> <mvt:else> <!-- do nothing //--> </mvt:if> <!-- if we get a match print a message//--> <mvt:if expr="NOT ISNULL g.product_exception_flag_1"> Test Message </mvt:if> </mvt:foreach>
Code:
Local Variables
l.settings:global_minibasket:groups[1]:code &mvt:global_minibasket:groups[1]:code; PROG-GE-SEAMSEAL2
l.settings:global_minibasket:groups[1]:product:code &mvt:global_minibasket:groups[1]:product:code; PROG-GE-SEAMSEAL2
l.settings:global_minibasket:items[1]:code &mvt:global_minibasket:items[1]:code; PROG-GE-SEAMSEAL2
l.settings:global_minibasket:items[1]:product:code &mvt:global_minibasket:items[1]:product:code; PROG-GE-SEAMSEAL2
l.settings:item:code &mvt:item:code; PROG-GE-SEAMSEAL2
l.settings:item:product:code &mvt:item:product:code; PROG-GE-SEAMSEAL2
Global Variables
g.product_exception_1 &mvt:global:product_exception_1; PROG-
g.product_exception_check_1 &mvt:global:product_exception_check_1; PROG-
Thanks.
Burt
Comment