Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Credit Class & GV v4.2 (MS1)


Ian

Recommended Posts

About bloody time I here you say. :lol:

 

Changes from v4.1

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

 

Most importantly the code is now based on the osCommerce MS1 release.

I've tried to make sure that all text is now in language files, and not hardcoded. The same goes for

database table names. If I've missed anything let me know.

 

Thanks to gdfwilliams, I've done away with separate box to show the amount in a customers Gift Voucher Account.

This is now shown in the shopping cart box.

 

The code now uses the get_content_type function to skip shipping selection if the Gift Voucher is the only item

in the cart. (Thanks to Thomas Plankers)

 

The decision to queue purchases of Gift Vouchers is now set in admin rather than having to edit a DEFINE in

add_application_top.php

 

I've also included some diff files to make life easier as well.

Trust me, I'm an Accountant.

Link to comment
Share on other sites

Ian,

 

Is it possible to have a single box that contains only the "Redeem Gift Voucher" link and the "Send Gift voucher" from categorie menu.

 

I think having the "redeem gift voucher" link in the information box doesn't stand out. I would like the gift voucher system to stand out as I want to encourage clients to use this feature.

 

 

regards

 

timp

Link to comment
Share on other sites

I also wanted to drop in and say I have added an image package to this contribution which can be used to make all the gift voucher images you want. There are some default usd amounts in there as well as 2 photoshop documents that you can edit.

 

linkified: gv_images.zip (220k)

 

Have fun with them (not too much fun mind you).

Link to comment
Share on other sites

I HAVE A PROBLEM, CANY ANYBODY HELP?

 

Hiya, whenever I confirm a "send GV to customer" from the admin, the GV send except displays a blank white page, I have to press Back to get back to the Admin...

 

How do I sort this?

 

Thanks,

Warren

Link to comment
Share on other sites

I think there are some files missing in this package. I have carefully installed the package and it is not working for me. the gv_ tables are not getting updated. I am currently working on looking at the loaded 5 & 4.1 vs. 4.2 to see if I can help confirm & fix some bugs.

 

I shall return!

Link to comment
Share on other sites

Same here! I did notice a few things though,

 

send_gv & send_gv_process are now not needed.

 

Also not needed but included is the code to include the gift_voucher.php box in column_right.php.

 

In several of the language gv_FILENAME's are the defines for NAVBAR_TITLE_1 when the cooresponding gv_FILENAME in /catalog uses NAVBAR_TITLE (w/o the '_1') which means breadcrumbs are broken.

 

One thing I personally would LOVE is if you and osmosis (Pablo Pasqualino) could get together and formulate some way of working with PayPal to auto-que the use of the voucher with PayPal.. As it is right now.. if the customer checks the "Tick to use Gift Voucher account balance" and then uses PayPal . The voucher account gets deducted even if the user doesn't complete the purchase. Which basically is lost with no hope of return without sending a customer a new voucher.. but there isn't really an audit trail available for you to verifiy this! without some order history diging.

 

How exactly do the gift vouchers work if say the total is less than the amount in the voucher account?? I see that the voucher account just goes down by the total amount.. but does the selected payment method code still run??

Link to comment
Share on other sites

Hi all,

I'm having a little problem with the gv system v 4.2 with an otherwise vanilla ms1 installation. My state charges 6.25% sales tax. when a customer uses his voucher account to pay for a purchase, the full amount is deducted (incl tax) The customer is left with a voucher balance of say 5.9976.(according to the database) This displays to the customer as a balance of $6.00. If he then trys to send a voucher for 6.00 of course this fails. I'm sure there is just a round() call missing somewhere, but I need help finding it. What function(s) figure out and deduct purchases from the balance?

 

Thanks,

Mike

Link to comment
Share on other sites

Hey I just wanted to confirm this bug Mike has found. I have tested this and it is as stated. Perhaps if you only deal in USD, you could simply modify the gv_customer table 'amount' structure to a 2 decimal place integer. This should solve that problem! Of course then your customer with 5.9976 in their GV account now only has $5.99 instead of $6.00.

Link to comment
Share on other sites

Hi Guys,

 

I'm new to osCommerce, but have installed and have loaded Ian's GV 4.2

 

I'm not a programmer, but I followed the instructions and have installed perfectly......Don't seem to find any of the problems anyone else has mentioned....

 

Only minor bug was the reference to voucher.php in Right Column....

 

Even I was able to remove the relevant Code.....

 

Thanks for the programme and everyones contributions......

 

Cheers

Chris :D

The distance between a Person's Dreams and their Accomplishments can only be measured my their Desire.

Link to comment
Share on other sites

By the way, I also learnt how to spell measured and select and Avatar!!!

 

Mmm Donuts!!!

The distance between a Person's Dreams and their Accomplishments can only be measured my their Desire.

Link to comment
Share on other sites

I just installed the GV 4.2 and am testing it. I have no problems with it by sending a Voucher to an email, and then being able to come back and redeem it.

 

My only problem is that when I purchase a Voucher, it is not recognized as a voucher and gets processed as a regular product. I think maybe this is caused by the way I set up the voucher as a product.

 

As I said, I am just Testing. I have the PRODUCTS NAME = GIFT and the PRODUCTS MODEL = GIFT (I was unsure which one was supposed to have the GIFT code.) I have PRODUCTS QUANTITY = 100 and PRODUCTS PRICE = 25.00

 

Is this wrong? I don't understand why it's not being understood and processed as a Voucher when purchased.

 

Thanks,

Priest

Link to comment
Share on other sites

Right Ok - I have fixed my problem with the blank screen!

 

But noticed this:

 

When a customer buys a gift voucher - (I use the immediate setting) - shouldnt this then be placed somwhere in admin to see which code they were given, when they bought it etc?

Link to comment
Share on other sites

No,

 

Remember when someone buys a gift voucher, there is no code associated with it. The amount purchased is simply added to there GV account.

 

If a Gift Voucher is subsequently emailed out by that customer, then an entry is created in the GV tracking table.

Trust me, I'm an Accountant.

Link to comment
Share on other sites

I've been messing with the tax problem I found earlier. It seems to be more of an OSC problem than a GV problem. Anyway here's my fix

 

in ot_gv.php:

 

    function process() {

     global $order, $currencies;

     if ($GLOBALS['c_' . $this->code]) {

       $order_total = $this->get_order_total();

       $od_amount = $this->calculate_credit($order_total);

       $this->deduction = $od_amount;

       if ($this->calculate_tax == "true") {

         $tod_amount = $this->calculate_tax_deduction($order_total, $this->deduction);

         $od_amount = $this->calculate_credit($order_total - $tod_amount);

       }

       $order->info['total'] = $order->info['total'] - $od_amount;

       $this->output[] = array('title' => $this->title . ':',

                        'text' => '<b>' . $currencies->format($od_amount) . '</b>',

                        'value' => $od_amount);

       $this->deduction = tep_round($od_amount,TAX_DECIMAL_PLACES); //added by mfc to keep gv accounts 'clean'  This amount used by apply_credit later



     }  

   }

I added only the last line. I can't forsee any problems doing it this way, but I'm new at OSC. Anyone have any thoughts... Ian...

 

Regards,

Mike

Link to comment
Share on other sites

I read that the "The decision to queue purchases of Gift Vouchers is now set in admin rather than having to edit a DEFINE in

add_application_top.php" is the install file....Can someone point me to where in Admin I can find the setting for queue purchases? I just can't seem to find it. Thanks.

Link to comment
Share on other sites

In admin->modules->order_total->.

 

Click on the Gift Voucher Entry, then on edit in the right side box. You'll find the option newar the bottom of the box.

 

HTH

Trust me, I'm an Accountant.

Link to comment
Share on other sites

Thanks Ian for your reply...Unfortunately, it's not there! I was running the loaded 5 version which I assume had the 4.1 version, so I put the 4.2 version on and it was working great...Just can't figure out why the Queue selection isn't showing up. I doublechecked the ot_gv.php file to make sure the Queue settings were present and they are...Any other ideas on what I can look for to figure out why this isn't appearing? Many thanks.

Link to comment
Share on other sites

If you ever replace a payment/shipping/order_total module always disable the module first then re-enable after replacing.

 

That's the safest way. You should be all right just diabling the Gift Voucher module then re-enabling. The new option(s) should then appear.

 

Remember to note your settings before disabling as these will be reset.

Trust me, I'm an Accountant.

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.
Note: Your post will require moderator approval before it will be visible.

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...