Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Credit Class/Gift Vouchers/Discount Coupons 5.10


Strider

Recommended Posts

The problem is when i create a new discount code (the one i'm doing is a 5% discount) in OSCommerce admin, i can never select a correct End Date. The end date defaults to exactly 1 year into the future, from when i set the start date.

 

I can pick the new date, and preview it, but when I click insert it goes automatically to 1 year on from the coupon's start date.... (meaning i view its details and i see the wrong date).

 

Strange. Try applying the coupon admin rollup 2 package from the contrib section and see if it still does it.

Edited by molafish
Link to comment
Share on other sites

  • Replies 4.8k
  • Created
  • Last Reply

Top Posters In This Topic

There are different sections of code that display based on which action mode was passed to the page.

 

What is the action GET variable when you are having the problem? And what section of the $action switch is this code in? It looks like the 'new' case...

 

i've installed your new coupon_admin.php and still have the same problem it just doesn't load the full page.

 

The info you are asking me where do i look for it? if confused now

Link to comment
Share on other sites

also installed new bit of code into my genaral.php is there any other code that is needed to operate the voucher contribution that needs to be in here? I can't remember if i installed the general.php and added my mods to it from this contribution or left my original as it had mods to it already so i may of missed something out?

Link to comment
Share on other sites

For such a big contribution requiring a lot of changes to the stock OSC, I'm dissapointed by it's lack of documentation. I was excited to see an "Install" document only to find out that the only "installation" directions where to install on top of new copy of osc 2.2 ms2. I guess Im' not the only one because this thread is currently at 180 pages.

 

Not all the included files have comments about what was modified.

If you have a Few mods installed, I recommend staying clear of this contribution.

Link to comment
Share on other sites

I have the same problem. Anybody have any ideas. I am having a hard time following the layout of the table. It seems to span several files, or I just don't understand how it works.

 

Michael

 

Hi everybody, Hi Michael,

 

Just a few words.

 

This is a GREAT contrib! Great Great great and useful.

I love it but...

 

In the following message there is nothing personal except thoughts I'd like to share with you all.

Please take them in a positive way. Since about a year, I had been wanting to install this contrib.

 

I love it... but if you don't have a very very good knowledge of how it works in the code, you are in for some suprises like I was. There is so much to take care and correct when you install it.

 

I have read the title of the Forum... It mentions "Confused"... Hummm I am too now.

 

For instance

I downloaded the contrib (the latest) CCGV 5.15a2.

Applied it carefully. Took over 3 hours because I needed to diff my files. Although I do not have many contribs on my OSC.

 

After that, I installed what seemed like necessary updates to get it working perfectly.

These:

 

Updated rollup2 insomniac2 6 Feb 2006

Coupon Admin Bug fix rollup 2 molafish 6 Feb 2006

Bad Debug code hillro 30 Jan 2006

English version of module install file HallMarc 23 Jan 2006

Coupon Admin Bug fix rollup

 

That was just the start.

 

Spent well over 2 days trying to correct parts. Not major things, just small ones.

But it adds up pretty quickly... Not sure I am going to continue... I don't have enough time left now. Too bad.

 

Problems with the language files.

Even in English, sometimes it's not good. In others languages, as well.

Anybody who would review the languages would find it not that good.

Sometimes, it is not the language files, but the coding.

Necessary spaces between words are sometimes left out.

***So there is a need to carefully review those files.

 

Layout problems like the one mentionned by Michael in the previous post. Until I read his post, I was sure it my mistake. It wasn't. That layout problem is really annoying and it looks unprofessional. But changing it requires excellent knowledge of the inner works of the contrib since it is calling many files.

*** Has anyone taken a look at it?

 

Also, for some reason, there are Paypal changes in the contrib. Are they all really needed?

*** I would prefer not to have Paypal modifications from another contrib. if possible. For Paypal issues, we should go to to the right Paypal contrib.

 

I have read the long list of changes.

In theory, yes, you can download the contrib and install it.

*** A word of advice, be very careful. And make sure you have lots and lots of spare time to test and review it all.

 

I would like to recommend, that before you publish the next update that you do a good cleanup of the code that has been added over and over in the last 2 years. AND only publish urgent modifications.

 

*** I would love knowing who is coding, supporting it. It is not that obvious even if you read the forum posts for the Credit Class / Gift Vouchers / Discount contrib.

 

*** The most current list of bugs... so we all know what we are getting into.

Some are acceptable. Some aren't. It depends on each user's motives or requirements.

 

Why don't have a few beta testers to check things out before you release the new code to everyone?

Most of the time when one releases the code, the testing has only been done on their own installation but not on others. Same thing for languages and layout concerns maybe.

 

Anyways, keep up the good work... and I really hope we get a clear notification from the lead developers of this contrib. that it has been thoroughly reviewed.

 

I'll keep a watch.

 

Very best,

John

Link to comment
Share on other sites

Has anyone come up with a solution that solves the 2x issue for the $cc_id that doesn't involve changing to a different version? I'm using v5.13 and have made mods to the files for my clients functionality and I'd hate to have to do them over, make sure they work with the newer coding, etc. Plus, after working with versions earlier than 5.13 that worked fine, I'm a little sceptical on stability of newer versions (no offense).

 

I've tried the:

global $order,$ot_coupon,$currency;
// BEGIN >>> CCVG 5.15 - Custom Modification - fix Coupon code redemption error
// Moved code up a few lines
//if (!tep_session_is_registered('cc_id')) tep_session_register('cc_id');
$cc_id = $coupon_result['coupon_id'];
// END <<< CCVG 5.15 - Custom Modification - fix Coupon code redemption error

 

That came with newer version, but nothing. I haven't seen any solutions from page 150 or so on that work.

Link to comment
Share on other sites

hi guys .. sorry for this post, but 90 pages is little too much to get to know, how to install this contrib into already recoded OSC .. like find - add - change .. in install.php there is only "replace this file with clean MS2 OSC ..

 

thanx

Link to comment
Share on other sites

I am trying to get CCGV playing with with PayPal WPP Direct Payments & Express Checkout (http://www.oscommerce.com/community/contributions,3647/). I am using a fresh install of 2.2MS2.

 

I can get everything working fine except for one thing: I can't get the correct order total, including coupon discount, to get sent to paypal (doesn't matter whether I am actually paying with PayPal account or with a credit card using WPP gateway). Either way, my account gets charged the full order total, not taking coupon amount into account.

 

The correct amount shows up on my order email notification, in my order history, and so forth. The only place it's not getting handled right is the amount getting charged by paypal.

 

I notice there is a modification to /includes/modules/payment/paypal.php including with this contribution. Is what's needed a similar mod to /includes/modules/payment/paypal_wpp.php?

 

Please, any advice on this would be helpful as I have spent hours on this and I assume others must be using both of this fine contributions as well.

 

Thank you so much!

Cecil

Link to comment
Share on other sites

Hey, :blush:

 

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

-------------- quick detail of my osCommerce site ------

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

* I've installed a fresh oscommerce-2.2ms2

* then followed the instructions for CCGV1.51a

Including:

- Coupon Admin Bug fix rollup

- English version of module install file

- Fix some Paypal Mod error

- Bad Debug code

- Coupon Admin Bug fix rollup 2

- (only recently) Updated rollup2

 

Thats it i have no other contributions installed.

 

i have only made one small change to includes/modules/payment/paypal_ipn.php.

Find :

 

if (!in_array($my_currency, array('CAD', 'EUR', 'GBP', 'JPY', 'USD'))) {

$my_currency = 'USD';

 

and Change to :

 

if (!in_array($my_currency, array('AUD','CAD', 'EUR', 'GBP', 'JPY', 'USD'))) {

$my_currency = 'AUD';

 

This now means i can accept Australian Payments.

 

So i have a fresh install of osCommerce and the GV system.

 

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

------------------------what works in my store-----------------------------------------

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

* I can successfull purchase products and pay for them using pay pal (the module included in the updates).

* I can Successfully create coupons in the admin and redeem coupons in payments.

* I can send Gift vouchers through the admin section.

* I can redeem vouchers that are sent to me by email.

* I can purchase gift vouchers, and yes, correctly without shipping charges.

 

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

-------------------------- problems ---------------------------------------------------

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

* The vouchers i have purchased do not show up in the gift voucher cue, with or without the admin>modules>ordertotal>giftvouchers>Queue Purchases set to true or false.

 

* No email is sent to the customer containing the gift voucher when a gift voucher is purchased from the store, with or without the admin>modules>ordertotal>giftvouchers>Queue Purchases set to true or false.

Above i am assuming having Queue Purchases set to false means a gift voucher is automatically sent to the customer when the PayPal_ipn is set to "VERIFIED", correct me if i'm wrong.

 

* Also when i have a remaining amount of gift voucher it continues to take the amount off every transaction the customer makes, and does not reduce in value and can only be removed by sending it to another customer.

 

* Also when i have $45 dollars worth of products in my checkout and a $50 voucher and i do not tick the box which states "to be used from Gift Vouchers" it processes my transaction without going to pay pal and without deducting the $45 from the gift voucher. Please note that if i have a higher value than the gift voucher it does send me to the pay pal screen to collect payment.

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

 

 

I have been documenting any problems i had along the way, but most of the time it was settings in the admin or needing to press remove, and then install on different modules so it re initiated the values. nothing required code editing except the pay pal AUD array (see top of this reply).

 

I've been on this for a few days now and have hit a wall, i'm using beyond compare and have been running compares all the time to check the old files to new files and checking my steps. but i'm sure i've missed a simple "tick this box here" or "add this code" something like that. PLEASE HELP...

 

sorry for the long post i've just found more info at the start means less wasted time in simple questions.

Link to comment
Share on other sites

ok, so my question "should" be easy to answer... how do make the GV's ship for free?

 

Thanks! ;)

 

Admin>Configuration>Download>Enable Download

Set this to true.

 

&

 

Admin>Catalog>Products

When editing the GV or creating a new one Set your product weight to 0

also remember "Products Model" must start with GIFT

 

:thumbsup:

Link to comment
Share on other sites

I'm back with a new install and the updated CCGV version 5.16

 

 

if anybody is trying to get past the checkout_process.php and getting this error:

 

 

Warning: mail(): SMTP server response: 501 5.5.4 Invalid Address in E:\hshome\aidan\stmsnowsurf.com.au\catalog\includes\classes\email.php on line 520

Warning: Cannot modify header information - headers already sent by (output started at E:\hshome\aidan\stmsnowsurf.com.au\catalog\includes\classes\email.php:520) in E:\hshome\aidan\stmsnowsurf.com.au\catalog\includes\functions\general.php on line 33

 

I tried deleting everybit of white space in both files and that doesn't work,

also i can send emails through the contact us just fine as well as the admin so its not something to do with emails altogher, only here at the checkout process.

 

Easy FIX

Go to: Admin>Configuration>My Store

and only input emails like this: [email protected]

not

My Name <[email protected]>

 

Sorry not a coder so i don't know how to fix the file properly.

Link to comment
Share on other sites

Dear All,

 

I like the gift voucher / coupon contribution very much, I have a few suggestions for the next version and a request.

 

First the request is this, Can somebody please please write a manual install guide, as it is completely useless if like me you have 20 other contributions installed. The only reason I have tested it was because I created a new shop on a virtual server.

 

My suggestions for future products are:

 

First Suggestion

 

Have a redeem button on the page for the particular order, that way you don?t have to remember to go to two places (incase your forget to un-queue items if you have alot of orders)

 

Second Suggestion

 

Have a voucher purchase that has to be either emailed to someone or posted to someone, you purchase it and it is sent to the delivery address, in admin it pops up in the queue, you release it if it was an electronic voucher (this would be a question at checkout i.e. what type of voucher would you like, e-voucher or postal, they then select the option and then either enter the email details or have an option that says send to same delivery address as rest of parcel or send to another, they then get to enter the other address)

 

After all how many people purchase a voucher for themselves? and if you did email it to somebody they most likely think it was junk mail and delete it, even so If you do email it wouldn't it be better to give the customer the option to do it at checkout, instead of going to there account. Most people want a 'real' paper/card etc.. voucher posted to them so they can include it inside a birthday card etc...

 

When you view the order if it was a postal voucher there is a button linking to a template which you can customise, that displays a voucher to print out with the unique voucher identifier number incorporated into it for that order, which can only be used once by anyone, you can then print this and post it, or if you choose take the identifier and enter it into a program which makes vouchers etc? In the order it could also display the voucher number, not for them just for the owner, so the owner doesn't have to click the template button if he is using the number elesewhere.

 

If the voucher was electronic you have the option of saying queued or not and if it was postal it is automatically not queued. Also if an e-voucher it will send an email out saying that it has not been activated yet please allow X hours which you as owner can enter, also can alter the email template, just like the one when it has been activated but saying it will take up to X long to activate.

 

Third Suggestion

 

Facility to see vouchers connected to an order and delete it if they choose to cancel the order, if it has been activated, if it hasn?t choose to have that voucher number banned and added to a banned list, (make sure the number generator checks this list to make sure it doesn?t come up with one on it) (ability to backup this list)

 

Fourth Suggestion

 

Option to see each customers balance and alter it if needs be, in admin

 

Fifth Suggestion

 

Ability to set maximum voucher amount their account can have assigned to it, if it reaches the limit send an email saying please spend some of your account before registering activating another voucher.

 

Sixth Suggestion

 

Vouchers Bought List with totals of how many and total amount purchased

 

Seventh Suggestion

 

Total amount purchased and sent for emailed vouchers

 

Last Suggestion!

 

Coupons Used, and Values of Different Coupons Used, so you know how much its cost you etc?totals etc?

 

Sorry for the long list! I'm good with ideas but not very good with php! I can do very basic stuff but nothing more otherwise I'd implement these features myself.

 

I hope someone can implement them.

 

Regards,

 

Dan

Link to comment
Share on other sites

For one.. That java error on the checkout_payment page.. I found by fixing the order in which they're supposed to be in via the admin side in order totals.. That , that error went away.. Hope this info helps anyone who may need it..

 

Hi Red. How exactly did you order them?

Link to comment
Share on other sites

Using CCGV version 5.16 from BlueNoteMKVI i've got a Checkout Flaw that allows people to continually use a gift voucher as many times as they want without it deducting anything from the voucher, this only happens when the checkout amount is less than the gift voucher amount, and the "to be used from Gift Vouchers" box is not ticked.

 

Process:

* Redeem a voucher and have it successfully shows in your shopping cart

* then add an item in your cart that is less than the total of the gift voucher

* once at the payment information screen DONT tick the box "to be used from Gift Vouchers"

* then continue with the confirmation.

 

###Very Big Problem###

My payment went through successfully without going to paypal & nothing was deducted from the gift voucher. and i was able to continue doing this as many times as i wanted.

 

I retraced my steps and at the payment confirmation i ticked "to be used from Gift Vouchers"

and the payment goes through successfully and correctly removes the amount from the gift voucher.

 

So Gift Vouchers do work, however the "to be used from Gift Vouchers" tick box is not working properly when the products inside the checkout are less than the amount of the gift voucher.

 

Could somebody please confirm on their installation that this is not a CCGV bug,

and if not please help with suggestions on why this might be happening.

:blink:

Link to comment
Share on other sites

Using CCGV version 5.16 from BlueNoteMKVI i've got a Checkout Flaw that allows people to continually use a gift voucher as many times as they want without it deducting anything from the voucher, this only happens when the checkout amount is less than the gift voucher amount, and the "to be used from Gift Vouchers" box is not ticked.

 

Process:

* Redeem a voucher and have it successfully shows in your shopping cart

* then add an item in your cart that is less than the total of the gift voucher

* once at the payment information screen DONT tick the box "to be used from Gift Vouchers"

* then continue with the confirmation.

 

###Very Big Problem###

My payment went through successfully without going to paypal & nothing was deducted from the gift voucher. and i was able to continue doing this as many times as i wanted.

 

I retraced my steps and at the payment confirmation i ticked "to be used from Gift Vouchers"

and the payment goes through successfully and correctly removes the amount from the gift voucher.

 

So Gift Vouchers do work, however the "to be used from Gift Vouchers" tick box is not working properly when the products inside the checkout are less than the amount of the gift voucher.

 

Could somebody please confirm on their installation that this is not a CCGV bug,

and if not please help with suggestions on why this might be happening.

:blink:

 

I found this post which solves this problem:

http://www.oscommerce.com/forums/index.php?act...ndpost&p=772464

 

BUT >_<

 

I've found another problem where when i add a GIFT Voucher to my shopping cart and go from payment information to checkout confirmation it adds the giftvoucher to my account before i continue to the purchase screen. and then when you complete the purchase it adds it again. & it ignores the Admin>configuration>mystore>Display Prices with Tax (set to true).

 

I don't know if there is any reason me submitting my support request to this forum anymore, if you look up the page i've answered my own questions after days of pulling my hair out. please somebody help me before i go crazy, otherwise i'm going to throw my thinkpad in the river. at lease if i knew who to coordinate with in relation to know bugs so i'm not wasting my time reinstalling a hundred times thinking its my fault.

 

IS ANY BODY OUT THERE ---------- HellllllllOOOOOOOOOOoooo00oOOoooo :blink: (i'm going crazy)

Link to comment
Share on other sites

I've found another problem where when i add a GIFT Voucher to my shopping cart and go from payment information to checkout confirmation it adds the giftvoucher to my account before i continue to the purchase screen. and then when you complete the purchase it adds it again. & it ignores the Admin>configuration>mystore>Display Prices with Tax (set to true).

 

Still don't know why this happens, but i do know that if you turn on the gift voucher queue then you could possibly only press redeem for each entry (how ugly is that). and the reason why the voucher was not paying any attention to the "Display Prices with Tax" was that it needs Admin>Modules>Order Total>Gift Voucher>Credit Including Tax (and set it to true).

(im in australia and we normally show our prices including GST)

 

So:

(1) my cart is still doubling my gift voucher amount.

(2) sometimes the the "send gift voucher" link in the shopping cart still shows itself even though the Voucher Balance is $0.00.

(3) If an item is in your cart that is less than your shown gift voucher amount and you proceed to the checkout without ticking the use gift voucher box and proceed to pay pal. Then hit the back button to go back the the confirmation page then press continue again, it processes your payment without going to paypal and without deducting the payment from the gift voucher.

 

I know the last one is obscure, but it is a possible back door for fraudulant transactions.

 

Everything else is working fine, if somebody helps me get these last issues fixed i will submitt my installation steps to the contribution.

Link to comment
Share on other sites

Installation of CCGV v5.16

 

In catalog/includes/modules/order_total/ot_gv.php I have the following issues regarding <td> and </td> tags.

 

Around lines: 146/147, 189/189, 190/192, 194/194, 195/195 all have opening <td> and closing </td> tags. These look okay.

 

However,

Around line 136: </td> (no opening <td> tag)

Around line 193: </td> (no opening <td> tag)

 

 

Around line 136

//	  $_SESSION['cot_gv'] = false;	 // old code - Strider
  $cot_gv = false;
  if ($this->selection_test()) {
	$output_string = $this->checkbox . '</b>' . '</td>' . "\n";}

  return $output_string;
}

What should this look like with the opening <td> tag?

 

 

Around line 193

//		$selection_string .= TEXT_ENTER_GV_CODE . tep_draw_input_field('gv_redeem_code') . '</td>';
	$selection_string .= 'Enter your coupon code ' . tep_draw_input_field('gv_redeem_code') . '</td>';
	$selection_string .= ' <td align="right">' . $image_submit . '</td>';

What should this look like with the opening <td> tag?

Link to comment
Share on other sites

Installation CCGV v5.16

 

FYI For the developer of this contribution:

I found the following issue:

 

Catalog/includes/modules/order_total_coupon.php around line 76

 

THIS

function credit_selection() {
global $customer_id, $currencies, $language;
	$selection_string = '';
	$selection_string .= '' . "\n";
	$selection_string .= ' </tr><tr><td class="main">' . "\n";
	$selection_string .= TEXT_ENTER_GV_CODE . tep_draw_input_field('gv_redeem_code') . ' and click ';
	$image_submit = '<input type="image" name="submit_redeem" onClick="return check_form(), submitFunction()" src="' . DIR_WS_LANGUAGES . $language . '/images/buttons/button_redeem.gif" class="contbutton" alt="' . IMAGE_REDEEM_VOUCHER . '" title = "' . IMAGE_REDEEM_VOUCHER . '">';
	$selection_string .= '';
	$selection_string .= '' . $image_submit . '</td>';
	$selection_string .= '';
	$selection_string .= '' . "\n";
	return $selection_string;
}

 

I changed to this because the </tr><td> are incorrectly placed.

function credit_selection() {
global $customer_id, $currencies, $language;
	$selection_string = '';
	$selection_string .= '' . "\n";
//		$selection_string .= ' </tr><tr><td class="main">' . "\n";
	$selection_string .= ' <tr><td class="main">' . "\n";
	$selection_string .= TEXT_ENTER_GV_CODE . tep_draw_input_field('gv_redeem_code') . ' and click ';
	$image_submit = '<input type="image" name="submit_redeem" onClick="return check_form(), submitFunction()" src="' . DIR_WS_LANGUAGES . $language . '/images/buttons/button_redeem.gif" class="contbutton" alt="' . IMAGE_REDEEM_VOUCHER . '" title = "' . IMAGE_REDEEM_VOUCHER . '">';
	$selection_string .= '';
	$selection_string .= '' . $image_submit . '</td>';
	$selection_string .= '';
//		$selection_string .= '' . "\n";
	$selection_string .= '</tr>' . "\n";
	return $selection_string;
}

 

If I have incorrectly place the tags please let me know. Thanks.

Link to comment
Share on other sites

So, how can you install this package manually?
You need to look at the files in the contribution and compare them against a fresh set of OSC files. I was able to do this a few days ago BEFORE I found the program beyond compare :( (or just compare the flies against your existing ones like I did.... search each file for the term "gv" - it worked for me ;)

 

@simplyshop, thanks, that was exactly what I was looking for, and might never have found on my own!

Edited by akoss
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...