Customer wishes his customers to be able to print the basket and to email it before going through checkout.
Has anyone any idea how this might be done?
Thank you!
Has anyone any idea how this might be done?
Thank you!
<script language="javascript"> <!-- function mailpage() { var cart_div = document.getElementById("thisone"); mail_str = "mailto:?subject=" + escape ("Have a look at this: "); mail_str += "&body=" + escape("I thought you might like this " + cart_div.innerHTML.replace(/\n|<.*?>/g,'')); mail_str += escape (". You can see it at, " + location.href); location.href = mail_str; } // --> </script> <a href="javascript:mailpage()"><img src="emailafriend.png" width="25" height="25" align="absmiddle" border="0"/> Email to a friend</a> <div id="thisone" style="display:none;"><actinic:variable name="ShoppingCartGrid" value="Small Checkout Shopping Cart Grid Bare" /></div>
I thought you might like this Shopping CartProductQUANTITYPRICECOSTRemove Plaster Cornice Small Ogee CN101QUANTITY �25.50 �102.00 Wall Panel Shape WP243QUANTITY �38.00 �38.00 Subtotal�140.00 Shipping (Default delivery)�60.00VAT�40.00Total�240.00Checkout <. You can see it at, https://www.webeg.co.uk/ukps/cgi/ca000001.pl?ACTION=SHOWCART
<script language="javascript"> <!-- function mailpage() { var cart_div = document.getElementById("thisone"); var str = cart_div.innerHTML; str = str.replace(/<br>/gi, "\n"); str = str.replace(/<(?:.|\s)*?>/g, ""); cart_div.innerHTML = str; mail_str = "mailto:?subject=" + escape ("Have a look at this: "); mail_str += "&body=" + escape("I thought you might like this \n\n" + cart_div.innerHTML); mail_str += escape (". You can see it at, " + location.href); location.href = mail_str; } // --> </script> <a href="javascript:mailpage()"><i class="fa fa-envelope"></i> Email basket</a> <div id="thisone" style="display:none;"><actinic:variable name="ShoppingCartGrid" value="Small Checkout Shopping Cart Grid Bare" /></div>
I thought you might like this Shopping CartProductQUANTITYPRICECOSTRemove Plaster Cornice Small Ogee CN101QUANTITY �25.50 �102.00 Wall Panel Shape WP243QUANTITY �38.00 �38.00 Subtotal�140.00 Shipping (Default delivery)�60.00VAT�40.00Total�240.00Checkout <. You can see it at, https://www.webeg.co.uk/ukps/cgi/ca000001.pl?ACTION=SHOWCART
<tr class="cartprodlinerow">
$( "tr.cartprodlinerow" ).each(function(){ var name = $( ".cpdname", $(this) ).text(); var price = $( ".cpdprice", $(this) ).text(); alert (name + ': ' + price); });
<script language="javascript"> $( "tr.cartprodlinerow" ).each(function(){ var name = $( ".cpdname", $(this) ).text(); var price = $( ".cpdprice", $(this) ).text(); var quantity = $( ".cpdqty", $(this) ).text(); }); function mailpage() { mail_str = "mailto:?subject=" + escape ("Have a look at this: "); mail_str += "&body=" + escape("I thought you might like this \n\n " + name + ': ' + price + ' ' + "Qty: " + quantity + "\n\n"); mail_str += escape (". You can see it at, " + location.href); location.href = mail_str; }; </script>
<script language="javascript"> function mailpage() { var lines = "I thought you might like this \n\n "; $( "tr.cartprodlinerow" ).each(function(){ lines += $( ".cpdname", $(this) ).text() + ' ' + $( ".cpdprice", $(this) ).text() + ' Qty: ' + $( ".cpdqty", $(this) ).val() + "\n\n"; }); mail_str = "mailto:?subject=" + escape ("Have a look at this: "); mail_str += "&body=" + escape(lines + "\n\n"); mail_str += escape (". You can see it at, " + location.href); location.href = mail_str; }; </script>
lines += $( ".cpdname", $(this) ).text()
lines += $( ".cpdname", $(this) ).html()
<script> $( "tr.cartprodlinerow" ).each(function(){ var name = $( ".cpdname", $(this) ).text(); var price = $( ".cpdprice", $(this) ).text(); var quantity = $( ".cpdqty", $(this) ).text(); alert (name + ': ' + price + ': ' + ' Qty: ' + quantity); }); </script>
<script language="javascript"> function mailpage() { var lines = "I thought you might like this \n\n "; $( "tr.cartprodlinerow" ).each(function(){ lines += $( ".cpdname", $(this) ).text() + ' ' + $( ".cpdprice", $(this) ).text() + ' Qty: ' + $( ".cpdqty", $(this) ).val() + "\n\n"; }); mail_str = "mailto:?subject=" + escape ("Have a look at this: "); mail_str += "&body=" + escape(lines + "\n\n"); mail_str += escape (". You can see it at, " + location.href); location.href = mail_str; }; </script> <a class="btn btn-secondary" href="javascript:mailpage()"><i class="fa fa-envelope"></i> Email the basket</a>
I thought you might like this �25.50 Qty: �6.90 Qty: . You can see it at, https://www.webeg.co.uk/ukps/cgi/ca000001.pl?ACTION=SHOWCART
$( "input[name^='Q_'" ).addClass( "cpdqty" );
$( ".cpdprice", $(this) ).text().replace("£", "GBP ")
$( ".cpdqty", $(this) ).find('input').val()
Comment