Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Free Product Checkout Module (Bypass Payment)


Guest

Recommended Posts

Free Product Checkout Module (Bypass Payment) intend to bypass payment procedure for free product(s).

 

If Some one upgread it please don,t forget to inform me at this contact form: http://www.fxmatics.com/my-contact/

 

DEMO: http://www.fxmatics....ex.php/cPath/22

 

Install Free Product Module

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

 

1. Upload all the content inside the included /catalog/ folder to the folder where your shops files are located on your server.

 

2. Go into your shops admin modules >> payment , choose and install the "Free Product" module and fill out the required info.

 

Have a good Free!!! :thumbsup:

Link to comment
Share on other sites

  • 2 months later...

When I load this, I get this on my OSC admin module page:

 

Warning: include(/hermes/bosweb/web256/b2569/ipg.----------/includes/languages/english/modules/payment/free.php) [function.include]: failed to open stream: No such file or directory in /hermes/bosweb/web256/b2569/ipg.------------/admin/modules.php on line 129

 

Warning: include() [function.include]: Failed opening '/hermes/bosweb/web256/b2569/ipg.--------------/includes/languages/english/modules/payment/free.php' for inclusion (include_path='.:/usr/local/lib/php-5.2.17/lib/php') in /hermes/bosweb/web256/b2569/ipg.-------------/admin/modules.php on line 129

Link to comment
Share on other sites

  • 1 month later...

Hello fxmatics,

Thanks for this add-on. I have install and configured the add-on as instructed, however, I still have a little challenge.

The problem I want to fix is to bypass selection of payment method for free ($0.000) products and link straight to free product add-on Order Confirmation page.

 

Thanks in advance.

Link to comment
Share on other sites

Hi fxmatics, thank you for sharing your creation with us!

When I uploaded the catalog folder, with all of it's contents to where my shops files are located, I couldn't find the "Free product module" anywhere in shops admin modules >> payment.

Any idea why?

Thank you kindly.

Link to comment
Share on other sites

  • 7 months later...

Thank you!!! It works wonderful. I am working with a page that only needs to ask pro prices, so these contrib helped me a lot.

 

Does any one, have the idea how to insert a comment box on the last step (checkout_confirmation.php), and these comment insert in mail, which we receive from the server. Cause I could insert the comment box, but I don't get the message.

 

Thank you again!

Link to comment
Share on other sites

  • 3 months later...

I installed this nice contribution, but I have one problem.

The Shipping page is successfully bypassed, but Payment page is not bypassed.

I followed the instructions:

 

- In admin > payment I set "Free Product" as the first payment method.

- In "catalog/checkout_payment.php" just before:

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_PAYMENT);

I added:

// BOF skip if only 1 payment method available. IF YOU HAVE 2 PAYMENT METHODS then "set tep_count_payment_modules() == 2"

if (tep_count_payment_modules() == 1 ) {

$payment_select = $payment_modules->selection();

$payment = $payment_select[0]['id'];

if (!tep_session_is_registered('payment')) tep_session_register('payment');

tep_redirect(tep_href_link(FILENAME_CHECKOUT_CONFIRMATION, '', 'SSL'));

}

// EOF

I put only one free product in my shopping cart, but when I click Checkout, the Payment page still opens :(

How can I bypass Payment page?

 

 

Best wishes,

Andrej Kikelj

Link to comment
Share on other sites

  • 2 months later...
  • 3 months later...

Hello Andre,

 

I've just enabled this module and got the same problem as you. To resolve it look at these lines in catalog/checkout_payment.php form the contribution:

 

 

// BOF skip if only 1 payment method available. IF YOU HAVE 2 PAYMENT METHODS then "set tep_count_payment_modules() == 2"

if (tep_count_payment_modules() == 3 ) {

$payment_select = $payment_modules->selection();

$payment = $payment_select[0]['id'];

if (!tep_session_is_registered('payment')) tep_session_register('payment');

tep_redirect(tep_href_link(FILENAME_CHECKOUT_CONFIRMATION, '', 'SSL'));

}

// EOF

 

I've got three payment methods INCLUDING the Free addon therefore have set tep_count_payment_modules() == 3 and it works!

 

You will see no more payments methods after this. Just follow the code!

 

Lorraine

Link to comment
Share on other sites

  • 4 weeks later...

Hello,

 

This is a great, simple and effective add-on!

Nevertheless, I got a, probably simple, question.

 

I managed to set this all up, with various other payment methods as well.

But, as it is a free download, I want to change the order status to Delivered immediately. This saves the administrator and customer a lot of time of course, because he doesn't need to change the status by him/herself.

 

 

I already found the next lines of code, and I'm quite sure that this has to have some additional code, so that the order status will be changed.

 

function after_process() {
return false;
}

 

if someone can help me with it, I'd be very happy :)

 

Thanks for the thoughts already!

Luke

Edited by LukeBanning
Link to comment
Share on other sites

@@LukeBanning

 

Have a look at the super downloads addon. It will automate the full downlaods process. Some say it is not needed in 2.3 versions, but I still use it, and it works as I would expect for both paid and free downloads.

I took a look at it. Looks good. But on the other hand, everything works right now, The Free Product Checkout payment just needs to set the order status to 'Delivered' and that's it.

I'm quite sure it's a very simple code, but I couldn't figure it out yet...

Link to comment
Share on other sites

@@LukeBanning

I don't understand. You want it to set the order status to complete after you have purchased a free product, such as a download??

Change the order status in the Free Product module under "Modules >> Payments >> Free Product" on the admin page.

ie. http://mtrosemedia.tk/store/product_info.php/resource-and-pentecost-q42012free-p-57?cPath=24

 

Is that what you want??

I may be missing something because I have Super Downloads, but I don't see the issue. If you set it to an order status that is allowed to download products, then when the "Order" is "Paid" they can download immediately

Let me know

Link to comment
Share on other sites

@@LukeBanning

I don't understand. You want it to set the order status to complete after you have purchased a free product, such as a download??

Change the order status in the Free Product module under "Modules >> Payments >> Free Product" on the admin page.

ie. http://mtrosemedia.tk/store/product_info.php/resource-and-pentecost-q42012free-p-57?cPath=24

 

Is that what you want??

I may be missing something because I have Super Downloads, but I don't see the issue. If you set it to an order status that is allowed to download products, then when the "Order" is "Paid" they can download immediately

Let me know

Hi...

 

I should feel ashamed. I totally overlooked it all the time... It was there, but I just didn't see it...

Was already trying to code some stuff myself, until you gave this beautiful simple answer...

 

Thanks a lot!

Kind regards,

Luke

Link to comment
Share on other sites

  • 1 year later...

just put in the checkout_payment

 

after $payment_modules = new payment;

 

if ( $order->info['subtotal']+$order->info['shipping_cost']==0 ) {

tep_redirect(tep_href_link(FILENAME_CHECKOUT_CONFIRMATION, 'payment=freeofcharge', 'SSL'));

 

 

you can change freeofcharge in anything

Link to comment
Share on other sites

  • 5 months later...

Hello,

 

I am trying to prevent this error when checking out with zero cart total (I have a 100% discount coupon for members). Currently Authrorize.net shows this error

 

The following errors have occurred.

(5) A valid amount is required.

 

This add on was suggested to me and I've installed it, made sure FREE SHIPPING is first in the order above the regular payment module and included the extra bits of code to to checkout_shipping.php and checkout_payment.php to bypass any shipping and payment pages but it has made no difference.

 

Can anyone please advise if this add on should work for what I want to achieve? ie. I'm not offering any free products as such but am trying to use 100% discount coupon.

 

 

Link to comment
Share on other sites

  • 4 weeks later...

@@igloobob

If you have the payment module installed, then, during checkout, select the Free payment type.

Do not select the Authorize.net payment when there is an amount of 0.00

Ultimately you can bypass the payment page by following the intruction.txt

Be sure to change the number of payment count based on how many payment modules you have ENABLED (Including the FREE PRODUCT CHECKOUT payment module)

Edited by newburns
Link to comment
Share on other sites

  • 1 month later...
  • 3 years later...
On 7/9/2011 at 9:49 PM, fxmatics said:

Free Product Checkout Module (Bypass Payment) intend to bypass payment procedure for free product(s).

 

If Some one upgread it please don,t forget to inform me at this contact form: http://www.fxmatics.com/my-contact/

 

DEMO: http://www.fxmatics....ex.php/cPath/22

 

Install Free Product Module

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

 

1. Upload all the content inside the included /catalog/ folder to the folder where your shops files are located on your server.

 

2. Go into your shops admin modules >> payment , choose and install the "Free Product" module and fill out the required info.

 

Have a good Free!!! :thumbsup:

Hi!

I have created a free video on a site only that I have to pay I have chosen as payment method 0.0 $ as I do to bypssare the free payment and download my project?

 

Link to comment
Share on other sites

On 15/4/2013 at 23:43, LukeBanning said:

Ciao,

 

Questo è un ottimo, semplice ed efficace add-on!

Tuttavia, ho ottenuto una domanda, probabilmente semplice.

 

Sono riuscito a impostare tutto questo, con vari altri metodi di pagamento.

Tuttavia, poiché è un download gratuito, desidero modificare immediatamente lo stato dell'ordine in Consegna. Ciò consente all'amministratore e al cliente di risparmiare molto tempo, poiché non ha bisogno di cambiare lo stato da solo.

 

 

Ho già trovato le righe successive del codice e sono abbastanza sicuro che questo deve avere un codice aggiuntivo, in modo che lo stato dell'ordine venga modificato.

 

 


 

 

 

se qualcuno mi può aiutare con esso, sarei molto felice :)

 

Grazie per i pensieri già!

Luca

Tell me how did you do it? have you tried to download paid software including the full license?
Help me understand this situation.
Thank you.

Link to comment
Share on other sites

  • 2 years later...

I'm trying to install this contribution on osC 2.3.4 BS GOLD, to be used with the Gift Voucher contribution: https://apps.oscommerce.com/KMILS&gift-vouchers-secure-v1-0

Everything is in place but when I get to checkout_confirmation.php and click the Confirm button, I get sent back to the checkout_payment.php with this error:

"Please select a payment method for your order."

The problem is caused by line 90 of checkout_process.php:

if ( ($payment_modules->selected_module != $payment) || ( is_array($payment_modules->modules) && (sizeof($payment_modules->modules) > 1) && !is_object($$payment) ) || (is_object($$payment) && ($$payment->enabled == false)) ) {
    tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(ERROR_NO_PAYMENT_MODULE_SELECTED), 'SSL'));
  }

The first condition is false because $payment_modules->selected_module = NULL

Why would it be false?

Edited by cinolas
Link to comment
Share on other sites

Specifically: 

is_object($$payment)

Which is weird because $payment = 'free' and a var_dump on checkout_confirmation.php shows:

["free"]=>
    object(free)#19 (5) {
      ["code"]=>
      string(4) "free"
      ["title"]=>
      string(36) "Pay with my Gift Certificate balance"
      ["description"]=>
      string(12) "Free Product"
      ["enabled"]=>
      bool(true)
      ["sort_order"]=>
      string(1) "1"
    }

 

Edited by cinolas
think before you type
Link to comment
Share on other sites

I had this module working on my old Frozen site to sell free downloads and it worked faultlessly. Have you set it to be the first payment module selected and set the correct number of other payment modules as explained in the instructions. I had problems with this until I got it right.

REMEMBER BACKUP, BACKUP AND BACKUP

Link to comment
Share on other sites

11 hours ago, 14steve14 said:

I had this module working on my old Frozen site to sell free downloads and it worked faultlessly. Have you set it to be the first payment module selected and set the correct number of other payment modules as explained in the instructions. I had problems with this until I got it right.

Thanks, @14steve14. I have set it to be the first payment module, but it looks like setting the correct number of other payment modules was just for when you want to bypass the payment page. I do need the payment page still, that's where the Gift Vouchers are applied.

From the install instructions:

Quote

4. OPTIONAL: TO BYPASS PAYMENT PAGE
- MUST: Go into your shops admin module >> paymet, set "Free Product" payment module as the first payment method at "Sort order of display". Make it 0 and the other payment method(s) higher.

- Open your oSC file "catalog/checkout_payment.php"

- just before:
  require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_PAYMENT);

  ADD:
  // BOF skip if only 1 payment method available. IF YOU HAVE 2 PAYMENT METHODS then "set tep_count_payment_modules() == 2"
    if (tep_count_payment_modules() == 1 ) {
    $payment_select = $payment_modules->selection();
    $payment = $payment_select[0]['id'];
    if (!tep_session_is_registered('payment')) tep_session_register('payment');
    tep_redirect(tep_href_link(FILENAME_CHECKOUT_CONFIRMATION, '', 'SSL'));
    }
  // EOF

Though even if you bypass both the payment and shipping pages, it's the confirmation page that refuses my order. I am not sure why. and not sure how to debug past that is_object($$payment)

Thanks for the 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...