Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

Hi all,

 

First of all, just say I've been searching the forum and contributions for almost 5 hours, so this is my last chance, I know maybe is a stupid question, but... :'( ah, and sorry for my english.

 

I've got 2 kinds of products, A) products that will be send by mail and B ) products that the customer must come to the store for it or will be send by our courier company. So what I need is to avoid the mail shipping method showing up if in the checkout process a class B product is chosen.

 

I'm not using zones or weight, because they are not important for me, I only need to separate each product in the A or B group and avoid the mail shipping method if something of B is selected.

 

I have a shop with sts + header tags, flat shipping rate, multiple shipping dependency, European Bank Transfer and other payment modules installed.

 

I tried with Thickness dependency leter module because it says that "If letter shipping is not possible, it won’t won’t show up during check out." But I don't know if I missed something or my other contributions are interfering, in particular Header Tags, because when I set a thickness over the limit, the shipping method is still visible (and with 0.00 price) in the checkout proccess. (maybe I'm not configuring the values well).

 

I also tried to solve this problem in a not very pro way following this instructions, but nothing happened.

 

I'm not a programmer, but I'm not receiving any parse or whatever error, so I supose i followed the steps right, and this is not working properly for some reason.

 

If someone could help me or at least guide me into the correct path, i will be very happy.

 

thank you very much ^^

 

p.d. if you need more info or don't undestand my english, please ask me

 

p.d. sorry for my english

gatosol.jpg
Posted
I've got 2 kinds of products, A) products that will be send by mail and B ) products that the customer must come to the store for it or will be send by our courier company. So what I need is to avoid the mail shipping method showing up if in the checkout process a class B product is chosen.

 

I'm not using zones or weight, because they are not important for me, I only need to separate each product in the A or B group and avoid the mail shipping method if something of B is selected.

 

You could check how this module works

http://www.oscommerce.com/community/contributions,4416

Posted

thank you for the suggestion, I'll give it a try, it looks like it makes what I need

 

thanks^^

 

--------------

 

I contacted with the author of the Thickness dependency leter module for help, I'm going to put here the answer he gave me for if it can help anyone in the future

 

ah, and thanks to peteruittilburg for his wonderful contribution and help

 

Lets see if we can resolve this problem. Several people are using and

misusing this contri, so it should work in your case too.

Are you sure you are using tablethicknessletteronly, and not

tablethickness, because tablesthickness will not vanish and

tablethicknessletteronly will.

 

The part of tablethicknessletteronly that will take care of the

vanishing is:

	 if ($this->enabled == true){
	$check_flag = true;
	if ($order->delivery['country_id'] == STORE_COUNTRY) {
	  if ($order_total > MODULE_SHIPPING_TTL1_WEIGHTMAX_NATIONAL_L) 
{
		$check_flag = false;
	  } elseif ($total_products_thickness > 
MODULE_SHIPPING_TTL1_MAX_THICKNESS) {
		  $check_flag = false;
	  }
	} else {
	  if ($order_total > MODULE_SHIPPING_TTL1_WEIGHTMAX_NATIONAL_L) 
{
		$check_flag = false;
	  } elseif ($package_thickness > 
MODULE_SHIPPING_TTL1_MAX_THICKNESS) {
		  $check_flag = false;
	  }
	}
	if ($check_flag == false) {
	  $this->enabled = false;		
	}		
  }

It checks the country weight_max and thickness_max for being allowed of

sending as letter mail. If it is not, $check_flag will be false,

resulting in $this->enabled = false and the module won’t show up.

 

Your problem sounds like the one other user had also. Setting mistake,

somewhere in the admin, involving country and STORE_COUNTRY settings,

caused the problem.

There is a test you can do. Change the upper part into:

	 if ($this->enabled == true){

$temp = ($order->delivery['country_id']);
echo ‘delivery_country= ‘ . $temp . ‘<br>’;
echo ‘STORE_COUNTRY = ‘ . STORE_COUNTRY . ‘<br>’;

	$check_flag = true;
	if ($order->delivery['country_id'] == STORE_COUNTRY) {
	  if ($order_total > MODULE_SHIPPING_TTL1_WEIGHTMAX_NATIONAL_L) 
{
		$check_flag = false;
	  } elseif ($total_products_thickness > 
MODULE_SHIPPING_TTL1_MAX_THICKNESS) {
		  $check_flag = false;
	  }
	} else {
	  if ($order_total > MODULE_SHIPPING_TTL1_WEIGHTMAX_NATIONAL_L) 
{
		$check_flag = false;
	  } elseif ($package_thickness > 
MODULE_SHIPPING_TTL1_MAX_THICKNESS) {
		  $check_flag = false;
	  }
	}
echo ‘if false, it will not show up: ‘ . $check_flag . ‘<br>’
	if ($check_flag == false) {
	  $this->enabled = false;		
	}		
  }

(Just added 3 lines under the first one, and one almost at the bottem)

When every thing is set correct, you will see two numbers on the upper

part of your page. This can be the same, of different, depending on

delivery country and store country. If one is missing, then that is

pointing to your problem.

I also added a line that will show the check_flag.If it says false, it

should not show up.

gatosol.jpg

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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...