Jump to content
Sign in to follow this  
Kennith

Hide if cost is zero

Recommended Posts

Hi this i a great contribution I've been playing around for af couple of days and it's all most perfect. I would really like it to do a check to see if the amount is zero and if that is the case I would like that "table" to be hidden.

 

The reason is that I would like to show one option if the weight is below 20 kg and another if its above.

 

I hope someone can help.

Share this post


Link to post
Share on other sites

hi

 

I'm not sure what contribution you have installed but it should be fairly easy to do what you want to do.

 

what page is it that you want to get rid of the price?

 

something like

 

<?php 


if ($products_price > 0)
{
echo $products_price;
}  ?>

 

should work.


Doh!!!!

Share this post


Link to post
Share on other sites
hi

 

I'm not sure what contribution you have installed but it should be fairly easy to do what you want to do.

 

what page is it that you want to get rid of the price?

 

something like

 

Oh I'm sorry thought I posted ind the support thread for the contribution. But I have MultiGeoZone MultiTable Shippong ver. 1.2 installaled The code that I need to alter I beilieve is this

 

   function quote($method = '') {
 global $order, $shipping_weight, $shipping_num_boxes;
 	  $combined_quote_weight = ($shipping_num_boxes * $shipping_weight);
  $this->quotes = array('id' => $this->code,
						'module' => constant('MODULE_SHIPPING_MZMT_GEOZONE_' . $this->delivery_geozone . '_TEXT_TITLE') . ' (' . $combined_quote_weight . ' lbs)',
						'methods' => array());

  $this->determineTableMethod(constant('MODULE_SHIPPING_MZMT_GEOZONE_' . $this->delivery_geozone . '_MODE'));  

  if ($method) {
	$j = substr($method, 5);

	$shipping = $this->determineShipping(split("[:,]" , constant('MODULE_SHIPPING_MZMT_GEOZONE_' . $this->delivery_geozone . '_TABLE_' . $j)));

	$this->quotes['methods'][] = array('id' => 'table' . $j,
									   'title' => constant('MODULE_SHIPPING_MZMT_GEOZONE_' . $this->delivery_geozone . '_TABLE_' . $j . '_TEXT_WAY'),
									   'cost' => $shipping + constant('MODULE_SHIPPING_MZMT_GEOZONE_' . $this->delivery_geozone . '_HANDLING'));
  } else {
	for ($j=1; $j<=$this->num_tables; $j++) {
	  if (!tep_not_null(constant('MODULE_SHIPPING_MZMT_GEOZONE_' . $this->delivery_geozone . '_TABLE_' . $j))) continue;

	  $shipping = $this->determineShipping(split("[:,]" , constant('MODULE_SHIPPING_MZMT_GEOZONE_' . $this->delivery_geozone . '_TABLE_' . $j)));

	  $this->quotes['methods'][] = array('id' => 'table' . $j,
										 'title' => constant('MODULE_SHIPPING_MZMT_GEOZONE_' . $this->delivery_geozone . '_TABLE_' . $j . '_TEXT_WAY'),
										 'cost' => $shipping + constant('MODULE_SHIPPING_MZMT_GEOZONE_' . $this->delivery_geozone . '_HANDLING'));
	}
  }

  if ($this->tax_class > 0) {
	$this->quotes['tax'] = tep_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
  }

  if (tep_not_null(constant('MODULE_SHIPPING_MZMT_GEOZONE_' . $this->delivery_geozone . '_ICON'))) $this->quotes['icon'] = tep_image(DIR_WS_ICONS . constant('MODULE_SHIPPING_MZMT_GEOZONE_' . $this->delivery_geozone . '_ICON'), $this->title);

  return $this->quotes;
}

 

Thank you fo your replay Hope you got time to look at it again and can give memore specific help

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×