#111 – Header of Easycheckbox on cart page

Posted in ‘Easycheckbox’
This is a public ticket. Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.
  Hello,

can you please help me with Header of Easycheckbox on cart page.

Whether the custom field with Easycheckbox is selected or NOT, in the product detail page always appears on cart page.

Please see attachment for clear picture.

Thank you
Teo
Vince
Screenshot of settings
Vince
Hi Teo,

Please open plugins/vmcustom/easycheckbox/easycheckbox.php

and search for
// show on cart view for VM3
function plgVmOnViewCartVM3(&$product, &$productCustom, &$html) {

then inside this function search for
		if (strpos($html,'smpriceincart') === false) {
		if (isset($myparams->show_prices_in_cart) && $myparams->show_prices_in_cart == 1) {
			if (isset($salesPrice) && $salesPrice <> 0) {
				$html_price = $currency->createPriceDiv($priceClass,'',(float)$salesPrice, true).'<br/>';
				if ($html_price == '') $html_price = $currency->createPriceDiv('','',(float)$salesPrice, true).'<br/>';
				$html .= '<div class="smpriceincart">'.$html_price.'</div>';
			}
			if (isset($salesPrice1) && $salesPrice1 > 0) {
				$html_price = $currency->createPriceDiv($priceClass,'',(float)$salesPrice1, true).'<br/>';
				if ($html_price == '') $html_price = $currency->createPriceDiv('','',(float)$salesPrice1, true).'<br/>';
				$html .= '<div class="smpriceincart">'.$html_price.'</div>';
			}
		}
		}
		$html  .= '<span>'.$myparams->custom_checkbox_name.' ';
		$html  .= $html2;
Then replace this with
		if ($html2 <>'') {
		if (strpos($html,'smpriceincart') === false) {
		if (isset($myparams->show_prices_in_cart) && $myparams->show_prices_in_cart == 1) {
			if (isset($salesPrice) && $salesPrice <> 0) {
				$html_price = $currency->createPriceDiv($priceClass,'',(float)$salesPrice, true).'<br/>';
				if ($html_price == '') $html_price = $currency->createPriceDiv('','',(float)$salesPrice, true).'<br/>';
				$html .= '<div class="smpriceincart">'.$html_price.'</div>';
			}
			if (isset($salesPrice1) && $salesPrice1 > 0) {
				$html_price = $currency->createPriceDiv($priceClass,'',(float)$salesPrice1, true).'<br/>';
				if ($html_price == '') $html_price = $currency->createPriceDiv('','',(float)$salesPrice1, true).'<br/>';
				$html .= '<div class="smpriceincart">'.$html_price.'</div>';
			}
		}
		}
		$html  .= '<span>'.$myparams->custom_checkbox_name.' ';
		$html  .= $html2;
		}
Best Regards,
Maja
maja_mlinar
Thank you Maja!

Now works fine!
Vince

About the author

Who‘s behind this

Demo

Maja Mozina Mlinar

founder
Demo

Sandi Mlinar

procurator

info@sm-planet.net

Skype: maja.mozina1