Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

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.

Link to comment
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.

Link to comment
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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...