Forums / All Other Contributions/Addons / Is there a way to stop downloads on orders over a certain amount?

Is there a way to stop downloads on orders over a certain amount?

Locked

Started by joannem on 27 Jul 2009, 5:06 PM · Views: 1,575

Results 1 to 14 of 14
This thread is locked. New replies are disabled.
27 Jul 2009, 5:06 PM
#1
joannem avatar

joannem

Zen Follower

Join Date:
Jul 2009
Posts:
110
Plugin Contributions:
0

Is there a way to stop downloads on orders over a certain amount?

Hi,

I run a digital scrapbooking store, and lately there's been a rash of people making purchases over $50 through Paypal, downloading the virtual products, and then charging back on their credit card or attached bank account.

Ideally, I need to be able to hold orders over $50 until I'm sure they aren't going to charge back and get the products for free.

I've looked through the forum but I can't find anything on this.

Can anyone help?

Thanks,
Joanne

27 Jul 2009, 6:25 PM
#2
ajeh avatar

ajeh

Oba-san

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

Re: Is there a way to stop downloads on orders over a certain amount?

You would have to customize the payment module(s) where the order status is set to change on orders that have totals >= 50 ...

Example, in Check/Money Order
/includes/modules/payment/moneyorder.php

this code is getting the setting for the Orders Status based on the settings of the Payment Module:

      if ((int)MODULE_PAYMENT_MONEYORDER_ORDER_STATUS_ID > 0) {
        $this->order_status = MODULE_PAYMENT_MONEYORDER_ORDER_STATUS_ID;
      }

You can change that value of the:
$this->order_status

based on the amount of the order to a different Order Status such as Pending, so the Downloads are not immediately available ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

27 Jul 2009, 6:30 PM
#3
joannem avatar

joannem

Zen Follower

Join Date:
Jul 2009
Posts:
110
Plugin Contributions:
0

Re: Is there a way to stop downloads on orders over a certain amount?

That's great information, but would there be anyone who could give me the exact wording and the exact files I'd have to change to do this - I have no clue how to write php :(

Thanks so much for answering!!

Joanne

27 Jul 2009, 7:12 PM
#4
ajeh avatar

ajeh

Oba-san

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

Re: Is there a way to stop downloads on orders over a certain amount?

It would be helpful to have more information for someone to re-write this ...

What payment module(s) ...

What Order Status do you want when over $50.00 etc.

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

27 Jul 2009, 7:46 PM
#5
joannem avatar

joannem

Zen Follower

Join Date:
Jul 2009
Posts:
110
Plugin Contributions:
0

Re: Is there a way to stop downloads on orders over a certain amount?

Thanks so much!!

It is the PayPal IPN - Website Payments Standard module.

If an order comes in for $50 or more, I still want them to be returned to the store site, but I want to put a new page instead of the download page that explains that there order will be held until proof of payment (I can do that part, as long as I know what to call the file and where to put it). So I guess it would be Order Pending or something along those lines for the Order Status.

If you need more info, just let me know, k?

Thanks!
Joanne

27 Jul 2009, 8:17 PM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: Is there a way to stop downloads on orders over a certain amount?

joannem:

If an order comes in for $50 or more, I still want them to be returned to the store site, but I want to put a new page instead of the download page that explains that there order will be held until proof of payment (I can do that part, as long as I know what to call the file and where to put it).

Why not use Admin->Tools->Define Pages Editor->define_checkout_success.php and just put a message there that everyone will see?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

27 Jul 2009, 10:08 PM
#7
joannem avatar

joannem

Zen Follower

Join Date:
Jul 2009
Posts:
110
Plugin Contributions:
0

Re: Is there a way to stop downloads on orders over a certain amount?

That would work if they didn't get returned right to the download page as soon as they pay at Paypal :P

27 Jul 2009, 10:10 PM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: Is there a way to stop downloads on orders over a certain amount?

I was specifically answering the part about the "new page".

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

27 Jul 2009, 11:01 PM
#9
joannem avatar

joannem

Zen Follower

Join Date:
Jul 2009
Posts:
110
Plugin Contributions:
0

Re: Is there a way to stop downloads on orders over a certain amount?

OK, thanks

28 Jul 2009, 7:01 PM
#10
ajeh avatar

ajeh

Oba-san

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

Re: Is there a way to stop downloads on orders over a certain amount?

For PayPal IPN (Standard), you would need to customize the Payment Module file:
/includes/payment/paypal.php

and change this section of code to be:

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

// bof: custom code for order status
      if ($order->info['total'] <= 50.00) {
        // set to normal setting for orders less than or equal to $50
        $this->order_status = MODULE_PAYMENT_PAYPAL_ORDER_STATUS_ID;
      } else {
        // set to pending for orders over $50
        $this->order_status = 1;
      }
// eof: custom code for order status

    if (is_object($order)) $this->update_status();

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

28 Jul 2009, 8:04 PM
#11
joannem avatar

joannem

Zen Follower

Join Date:
Jul 2009
Posts:
110
Plugin Contributions:
0

Re: Is there a way to stop downloads on orders over a certain amount?

Thank you so much!!!

I'm going to try it

Hugs,
Joanne

28 Jul 2009, 8:10 PM
#12
joannem avatar

joannem

Zen Follower

Join Date:
Jul 2009
Posts:
110
Plugin Contributions:
0

Re: Is there a way to stop downloads on orders over a certain amount?

OK, just to be sure I'm going to do this right, I would find this:

    $this->enabled = ((MODULE_PAYMENT_PAYPAL_STATUS == 'True') ? true : false);
    if ((int)MODULE_PAYMENT_PAYPAL_ORDER_STATUS_ID > 0) {
      $this->order_status = MODULE_PAYMENT_PAYPAL_ORDER_STATUS_ID;
    }
    if (is_object($order)) $this->update_status();

and REPLACE with this:

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

// bof: custom code for order status
      if ($order->info['total'] <= 50.00) {
        // set to normal setting for orders less than or equal to $50
        $this->order_status = MODULE_PAYMENT_PAYPAL_ORDER_STATUS_ID;
      } else {
        // set to pending for orders over $50
        $this->order_status = 1;
      }
// eof: custom code for order status

    if (is_object($order)) $this->update_status();

Is this correct?

Thanks so much for helping me!!

Joanne

29 Jul 2009, 1:16 PM
#13
ajeh avatar

ajeh

Oba-san

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

Re: Is there a way to stop downloads on orders over a certain amount?

That should work ... test it out to make sure this is working the way you need it ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

29 Jul 2009, 2:10 PM
#14
joannem avatar

joannem

Zen Follower

Join Date:
Jul 2009
Posts:
110
Plugin Contributions:
0

Re: Is there a way to stop downloads on orders over a certain amount?

Thanks so much for all your help - now I just have to find someone with $50 to test it for me :P

Hugs,
Joanne