Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Error While Creating New Shipment Rate Topic   - - - - -

 

Posted 03 April 2014 - 01:55 PM #1

Hello there,

We are licensed user of cs cart, www.dotestudio.com CS-Cart: version 3.0.2 PROFESSION

last time i have updated all security plugins which suggested by cs cart.

from this point, whenever i trying to create new shipment, it shows error massage
Error
Products for shipment were not selected

i don't what is problem. please help to solve this problem.

i have attached screen shot of error massage page.

Attached Thumbnails

  • error.PNG


 
  • Brownleather
  • Junior Member
  • Members
  • Join Date: 06-Jan 10
  • 51 posts

Posted 12 September 2014 - 04:38 PM #2

Edit this

controllers/admin/shipments.php

Replace this

function fn_check_shipped_products($products)
{
	$allow = true;
	$total_amount = 0;
  
	if (!empty($products) && is_array($products)) {
		foreach ($products as $product) {
			$total_amount += empty($product['amount']) ? 0 : $product['amount'];
		}
	  
		if ($total_amount == 0) {
			$allow = false;
		}
	  
	} else {
		$allow = false;
	}
  
	return $allow;
}

With this

function fn_check_shipped_products($products)
{
	$allow = true;
	$total_amount = 0;

	if (!empty($products) && is_array($products)) {
		foreach ($products as $key => $amount) {
			$total_amount += empty($amount) ? 0 : $amount;
		}

		if ($total_amount == 0) {
			$allow = false;
		}

	} else {
		$allow = false;
	}

	return $allow;
}