Jump to content
Latest News: (loading..)
T. Thomas

Credit Class & Gift Vouchers for 2.3.4

Recommended Posts

Anybody get this to work with 2.3.4?

 

The catalog/account.php has changed in order to comply with templates. I am trying to figure out how to add this:

<h2><?php echo GIFT_VOUCHER_COUPON; ?></h2>

  <div class="contentText">

        <?php
  if (tep_session_is_registered('customer_id')) {
    $gv_query = tep_db_query("select amount from " . TABLE_COUPON_GV_CUSTOMER . " where customer_id = '" . (int)$customer_id . "'");
    $gv_result = tep_db_fetch_array($gv_query);
    if ($gv_result['amount'] > 0 ) {
?>

      <p><?php echo CCGV_BALANCE .':' ?> <?php echo $currencies->format($gv_result['amount']); ?></p>
<?php

as this now is in includes/modules/pages/tp_account.php 

Share this post


Link to post
Share on other sites

I did not get the Gift Voucher to work. But the discount coupon works so far.

 

There are some other bugs in the issues, but so far, it seems fairly stable. I am no longer adding to it, just maintatining this repo. It is not the proper direction for osCommerce, but it is a band-aid for some. Just know, the band-aid is not a fix.

 

https://github.com/newburns/osCommerce-234-bootstrap-wADDONS

Share this post


Link to post
Share on other sites

Did a CCGV drop on a fresh osC 2.3.4 install, seems to be working. Couple of small things though.

 

Does anyone know how we can update the old school

 

<?php echo tep_image_submit('button_back.gif', IMAGE_BUTTON_BACK, 'name=back') . '</a>'; ?> in gv_send.php?action=send referring back to the filled-in form of gv_send.php?action=process

 

to a nice jquery button?

 

Tried tep_draw_button(IMAGE_BUTTON_BACK, 'triangle-1-w', 'javascript:history.back(-1)'), but that doesn't work, like the back button on the browser doesn't work for this purpose.

Edited by iTea

Share this post


Link to post
Share on other sites

According the instruction, there are several files called add_ccgvdc_xxx.php such as add_ccgvdc_english.php

But I can't find it out in the package, so, where can I DL it

 

Thankz

Share this post


Link to post
Share on other sites

Hi     I have just installed this contribution and have managed to get the discount coupon working ok, but the gift voucher is not working and I dont know why.  I can checkout the gift voucher fine but nothing is being added to the GV queue? I checked the backend database and nothing is getting posted to there.

 

I tested this with several payment modules, cash with order, sagepay server and paypal express and the same happens. 

 

Can anyone help?  or if not help per se, just let me know which php file is supposed to post to the GV Queue so I can look at it and see if I can work out the issue I am having. 

 

Many thanks in advance

Share this post


Link to post
Share on other sites

This whole contribution needs to be reworked totally as a module instead to be honest. THe whole thing is really buggy at the moment. Gift voucher I think has been a issue that no one has resolved as of yet. I believe it is being worked on at the moment. Check out this:

 

https://github.com/newburns/osCommerce-234-bootstrap-wADDONS

 

I have been trying to get this to work with Paypal Standard and is not working at the moment.

Share this post


Link to post
Share on other sites

I had a problem its taken days to work out on both this version and the 2.3.4 version of CCGV.   The admin amounts were all showing as 0 and the vouchers were not discounting properly and could be re-used.

 

I only have one currency and there is a bit of code throughout all the CCGV new files

 

$currencies->format

It clicked when I was changing the default currency on the store and all the amounts went to 0. I checked in the sql database and in there all the amounts are shown correctly in there so I realised it must be something to do with the currency throwing out the display.

 

Sure enough when I removed all instances of this code, it works.

 

Of course this fix is only workable if your store only shows in one currency, but then again if there were more than one currency - maybe this error would not show but for anyone who has been tearing their hair out with this issue, I found a solution.

Share this post


Link to post
Share on other sites

@@Oooooooo Disregard that file no longer needed, like I said this contribution is old, buggy and code is really old. Needs to be either reworked into the core or a module by itself. I rather see it probably as a module since this really changes the order process of the cart. Therefore, anytime the order system gets updated it will break up the system instead of just this addon. I hope I am making sense.

 

This module should not be used on a live store at the moment since it's very buggy in my opinion.

Share this post


Link to post
Share on other sites

Eventually someone will get this done I am sure of it. I am looking on oscmax and it works there and basically the same code as oscommerce. That's what I am looking at to see why it works for that cart and not the bootstrap version. I have never tried it on 2.3.4 though but should be the same. I am thinking possibly it may have to do with not passing the order id or session to the cart after processing through paypal. The coupon works at the moment on my side but not through paypal. It keeps coupon and never applies it off. When you go back to checkout the coupon still remains in cart and you dont even need to enter a coupon that is for sure a problem.

Share this post


Link to post
Share on other sites

Hi

 

I looked at your contrib, It would be great if it was added in as a module, I think there would be a lot of people happy to pay for it as well.  Its almost a given that something like this is needed as standard.

 

I havent gone through any more testing but I just found this issue as I only use the one GBP currency in my store.  I have a template bought from template monster and they have changed so much of the base php files it was impossible for me to upgrade the template easily to 2.3.4.  Both the 2.3.3 version and this one gave me the same result with the zero's.

 

The database was holding the correct amounts though, so I am not sure how much of an impact this actually will have on the functionality, but will test it tomorrow and report back.  Oh it should be said that I checked out with COD on my tests, but actually use sage pay server on my site.  I do know there was some issue mentioned on the forums about the before_process and that the payment modules werent going back to checkout_process.  

 

Its hard when you arent actually a php coder to work it all out.. my mind just boggles sometimes :) 

 

 

This whole contribution needs to be reworked totally as a module instead to be honest. THe whole thing is really buggy at the moment. Gift voucher I think has been a issue that no one has resolved as of yet. I believe it is being worked on at the moment. Check out this:

 

https://github.com/newburns/osCommerce-234-bootstrap-wADDONS

 

I have been trying to get this to work with Paypal Standard and is not working at the moment.

Share this post


Link to post
Share on other sites

perhaps we should all chip in and get someone on freelancer to bid for it :)  I might email the magneticone team they did a nice little backend system that I use. Maybe they'd take it on.

Share this post


Link to post
Share on other sites

Fixed for bootstrap version; added paypal standard to it as well. Not sure if gift vouchers is working. I havent tested that yet

Share this post


Link to post
Share on other sites

@@pinkequine the gift voucher must start with GIFT i know that so lets say you want to do a $25 voucher you would do GIFT_25 or something like that. I will look into it as I havent tested that function yet. The coupon function is fixed for paypal, etc. However, I think front end needs work still as newburns I think is working on that. Like a button of some sort. I think maybe though we can create a shopping cart box that shows amount, etc than apply coupon to that.

Share this post


Link to post
Share on other sites

Hi Everyone
 
I have installed this wonderful contribution and all seems to be working well. Anyone know how to change the back image button into bootstrap please?
 
In /gv_send.php
 
From line 137:

          <tr>
            <td class="main"><?php echo tep_image_submit('button_back.gif', IMAGE_BUTTON_BACK, 'name=back') . '</a>'; ?></td>
            <td align="right"><br><?php echo tep_draw_button(IMAGE_BUTTON_CONTINUE, 'triangle-1-e', null, 'primary'); ?></td>
          </tr>

I have tried but i don't know how to implement the param 'name=back' .. All help is much appreciated

Share this post


Link to post
Share on other sites

I installed 2.3.3.4  3 years back and quiet some extra addons running like MTS and started this week to ad CCGV but get errors in checkout_confirmation.php by command :

 

$order_total_modules->collect_posts();
 
quiet difficult to compare same named files,  petty no manual is available to put instructions manual into the PHP files.

Share this post


Link to post
Share on other sites

I added this to Bootstrap any issues or suggestions let me know. I can also need help with fixing account.php for this

 

Edited by burt
Remove Fork URL

Share this post


Link to post
Share on other sites

I am looking into making this as an app like paypal. I am guessing just need to do a require on pages that need it so the core won't be touched. Suggestions?

Share this post


Link to post
Share on other sites

Hi, I'm running this, and when I select the start end date for the voucher, the lack of available years is beginning to cause a problem.  the drop down menu only allows a year selection from 2010 to 2018, can anyone tell me how I change this to essentially remove the earlier years and add some later ones, i'e so I can run the dates from present to 2021 at least.  thanks


Running a botched up version of  osCommerce Online Merchant v2.3.4 bootstrap with the dresscode theme installed, numerous add-ons, terrible coding, terrible website, but will have to make do until I have made up for my losses and can risk shutting down for a couple of weeks while I start all over again. - I did not install my program but am endeavouring to fix it with your help.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×