Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

hide a shipping option


chowpay

Recommended Posts

Hi,

 

I have 2 shipping methods. Fedex Ground, and and Flat rate. I want them both to be avaliable. But I only want one of them (Fedex Ground) to be displayed on the shiping page. I dont want to uninstall it, I just dont want it printed on screen.

 

The reason is we created a coupon field on the shipping page, and once entered it defaults to the "flate rate" which = 0. But I dont want users who do not enter the coupon code to see this option of a flate rate shipping.

 

is this possible? If so how. thanks in advance!

Link to comment
Share on other sites

Hi,

 

I have 2 shipping methods. Fedex Ground, and and Flat rate. I want them both to be avaliable. But I only want one of them (Fedex Ground) to be displayed on the shiping page. I dont want to uninstall it, I just dont want it printed on screen.

 

The reason is we created a coupon field on the shipping page, and once entered it defaults to the "flate rate" which = 0. But I dont want users who do not enter the coupon code to see this option of a flate rate shipping.

 

is this possible? If so how. thanks in advance!

 

I don't think there is any contribution like that around; however, if I were going to attempt to do it, I would use the Easy Coupons contribution. Then in the Shopping Cart add the link to enter the coupon code. (I use this method for discount coupons). Then when they return to the Shopping Cart you would need to add one line of code similar to:

 

 

If ($coupon ){
$navigation->set_snapshot();
tep_redirect(tep_href_link(FILENAME_PAYMENT, '', 'SSL'));
 }

 

In essence, this would make them skip the shipping page if the had entered a coupon. I don't claim this will work I haven't tried it but there's a good chance it will.

 

If there's a better way, I don't know it. But I'm sure someone who does will come along.

 

I'm not even sure the code is correctly written. :o

Just between us, remember there are only 10 kinds of people in the world; those who understand binary and those who don't!!

 

Remember, learning is a "do-it-yourself" experience; although, not necessarily a "do-it-BY-yourself" experience.

 

The quickest way to learn is to forget to BACKUP!

Link to comment
Share on other sites

ah thanks,

 

but i really dont want to skipp the shipping page, I just want it to only display 1 option, if they dont enter the code and click continue, it should give them the default shipping amount. If they do enter the code and continue, it will give them the flat rate price I set.

Link to comment
Share on other sites

Have you installed any coupon contribution?

 

 

yes I installed CCGV, but for the coupon on the shipping page I simply had a java script function written with this logic:

 

if value="password" shipping="flat_flat" I just need the flat rate to be hidden

Link to comment
Share on other sites

Add the following line:

 

if ($quotes[$i]['id'] != 'flat') {

 

after :

 

for ($i=0, $n=sizeof($quotes); $i<$n; $i++) {

 

Add a curly brace :

}

 

after:

<?php

$radio_buttons++;

}

}

?>

</table></td>

<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

</tr>

<?php

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...