Zen Cart Logo
Forums / General Questions / Shipping and Payment

Shipping and Payment

Locked

Views: 1,088

Results 1 to 9 of 9
This thread is locked. New replies are disabled.
3 Nov 2007, 8:57 PM
#1
bebijuteria avatar

bebijuteria

Zen Follower

Join Date:
Feb 2006
Posts:
124
Plugin Contributions:
0

Shipping and Payment

Can i do this?

When a costumer select a type of Shipping plan (for example A) have to mandatory a type of Payment.

For example

Shipping :

A
B
C

Payment:

X
Y
Z

When i select A (Shipping) i have to select Y (Payment)

Can i do this?

3 Nov 2007, 10:54 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Shipping and Payment

This type of feature can be designed for your shop ... it is not, however, built into Zen Cart ...

What you would want to control is the $this->enabled on the Payment Modules to change based on the Shipping Module selected ...

3 Nov 2007, 10:57 PM
#3
bebijuteria avatar

bebijuteria

Zen Follower

Join Date:
Feb 2006
Posts:
124
Plugin Contributions:
0

Re: Shipping and Payment

yes it this.

Any ideia, how to do it?

3 Nov 2007, 10:58 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Shipping and Payment

Make a function that decides based on the selected Shipping Module when to set the $this->enabled to false in the Payment Module ...

If false, then the Payment Module will not display ...

4 Nov 2007, 10:42 AM
#5
bebijuteria avatar

bebijuteria

Zen Follower

Join Date:
Feb 2006
Posts:
124
Plugin Contributions:
0

Re: Shipping and Payment

In what page and line can i do this?

4 Nov 2007, 3:33 PM
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Shipping and Payment

All of the Payment Modules have a line similar to:

      $this->enabled = ((MODULE_PAYMENT_MONEYORDER_STATUS == 'True') ? true : false);

What you need is a function to control the $this->enabled beyond the simple test of is it installed ...

Writing a function to test the conditions of what the Shipping Module is that the customer has selected and set that value to false to turn off a Payment Module when it should not show ...

The Shipping Modules use something similar to control when the Free Shipping freeshipper should show or not show and whether the other Shipping Modules should show or not show ...

For example the Item Rate item Shipping Modules uses:

      // disable only when entire cart is free shipping
      if (zen_get_shipping_enabled($this->code)) {
        $this->enabled = ((MODULE_SHIPPING_ITEM_STATUS == 'True') ? true : false);
      }

If the function returns a false value, then the Item Rate item Shipping Module will turn off or hide from display ...

If the function returns a true value, then the Item Rate item Shipping Module will turn on or show on the display ...

4 Nov 2007, 3:50 PM
#7
bebijuteria avatar

bebijuteria

Zen Follower

Join Date:
Feb 2006
Posts:
124
Plugin Contributions:
0

Re: Shipping and Payment

I will try, but i don't know if i can do it :(

4 Nov 2007, 8:40 PM
#8
bebijuteria avatar

bebijuteria

Zen Follower

Join Date:
Feb 2006
Posts:
124
Plugin Contributions:
0

Re: Shipping and Payment

Could u help me?

5 Nov 2007, 5:10 PM
#9
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Shipping and Payment

$_SESSION['payment'] will tell you the payment such as: moneyorder

$_SESSION['shipping']['id'] will come up as: item_item or flat_flat

NOTE: UPS will show the module and type: ups_3DS