Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[CONTRIBUTION] CCGV (trad)


Vger

Recommended Posts

Try changing this in checkout_process:

// load the before_process function from the payment modules

$payment_modules->before_process();

 

require(DIR_WS_CLASSES . 'order_total.php');

$order_total_modules = new order_total;

 

$order_totals = $order_total_modules->process();

 

to this:

require(DIR_WS_CLASSES . 'order_total.php');

$order_total_modules = new order_total;

 

$order_totals = $order_total_modules->process();

// load the before_process function from the payment modules

$payment_modules->before_process();

 

Vger

 

I installed CCGV recently (sweet work Vger) and because of it upgraded to PayPal IPN 1.3 and made the necessary mods. Unfortunately, something doesn't work with PayPal and I get this error when returning to checkout_process.php:

 

"Fatal error: Cannot redeclare class order_total in /home/virtual/site2/fst/var/www/html/includes/classes/order_total.php on line 13"

 

...which I found a fix for, but now I get:

 

"Fatal error: Cannot redeclare class ot_subtotal in /home/virtual/site2/fst/var/www/html/includes/modules/order_total/ot_subtotal.php on line 13"

 

I've searched and searched and finally asked about this in the PayPal support thread, but no one seems to know about this. I wouldn't even be asking in this thread but I removed Paypal 1.3 and reinstalled 1.1 and I still get the same error, which points me back to CCGV. Has anyone else here done the same process and gotten the same error?

Link to comment
Share on other sites

Hi

 

It is entirely possible that i am being very dumb on this but i have installed CCGV and all appears to be working ok except on the payments screen i don't get a tick box to apply the voucher - the voucher shows correctly under the shopping cart in the box but I don?t appear to be able to use it to pay for a purchase.

 

As far as I can tell i have installed everything correctly and all other parts of CCGV are working fine.

 

A second question i have is - can the gift vouchers be added as a 'product' so customers can buy them, and if that is the case, how?

 

I've been hitting my head for 2 days on the first question and getting no where!

 

All help very gratefully received!

 

cheers

Paul

Link to comment
Share on other sites

it looks like i was being dumb! The tickbox is there now all appears to be working - although i'm still not sure how to 'sell' gift vouchers.

 

 

 

Hi

 

It is entirely possible that i am being very dumb on this but i have installed CCGV and all appears to be working ok except on the payments screen i don't get a tick box to apply the voucher - the voucher shows correctly under the shopping cart in the box but I don?t appear to be able to use it to pay for a purchase.

 

As far as I can tell i have installed everything correctly and all other parts of CCGV are working fine.

 

A second question i have is - can the gift vouchers be added as a 'product' so customers can buy them, and if that is the case, how?

 

I've been hitting my head for 2 days on the first question and getting no where!

 

All help very gratefully received!

 

cheers

Paul

Link to comment
Share on other sites

it looks like i was being dumb! The tickbox is there now all appears to be working - although i'm still not sure how to 'sell' gift vouchers.

 

Hope this will help you:

 

Creating a Gift Voucher

Creating a gift voucher for a customer to buy is the same as creating a new product with the exception that the gift vouchers Model Number must start with the word GIFT in upper case. It can be GIFT_25 or GIFT25 or whatever you would like to use, as long as it starts with the word GIFT. You can create gift vouchers in any denomination. Gift certificate images have been provide in the catalog\images directory in denominations of ?5, ?10, ?20, ?50 and ?X (sample).

 

You can also create gift vouchers by sending them to your customers via the admin->Vouchers/Coupons->Mail Gift Voucher selection within the admin. To use this to send a voucher to a customer use the drop down customer list. To send to a single customer or future customer you can put their email in the Email To: text box. Do not use both the customer dropdown list and the Email To: text box or the customer will get 2 gift vouchers.

Link to comment
Share on other sites

We're having a problem that I'm hoping you can help us understand. Most of the products we sell are digital downloads. Once we receive payment on an order, the order is changed to complete so that the customer can receive their downloads immediately.

 

The problem we are having is that when a customer uses the gift voucher and the total amount due is $0.00, the order does not automatically change to complete, but stays at pending (default). We have to manually switch it to complete.

 

Any ideas??

 

TIA!

 

Ashley

Link to comment
Share on other sites

Hey Vger, thanks for the help. Unfortunately, I already made that change to my checkout_process.php file. Anything else you can think of that might point me to a solution?

 

 

 

Try changing this in checkout_process:

// load the before_process function from the payment modules

$payment_modules->before_process();

 

require(DIR_WS_CLASSES . 'order_total.php');

$order_total_modules = new order_total;

 

$order_totals = $order_total_modules->process();

 

to this:

require(DIR_WS_CLASSES . 'order_total.php');

$order_total_modules = new order_total;

 

$order_totals = $order_total_modules->process();

// load the before_process function from the payment modules

$payment_modules->before_process();

 

Vger

Link to comment
Share on other sites

Hi, I'll have to explain this a little better in the install file. Basically, if you use '</a>'); then this has to be the last entry in that list and the end of the previous entry needs to be changed to '</a><br>') .

 

I think it's better, when I next do an update, to advise people to place it in the middle of the list and make the end of the code read:

'</a><br>') .

 

Vger

 

Vger,

 

This is still not fixed, unfortunately. I have tried this a couple of different ways, using the advice you prescribed, to no avail. Here are my results.

 

(1) I changed the coding to put the link at the end of the array, but removed the ; from above as mentioned by others. The code therefore looked like this (my advance apologies for how it wraps on the board; my code is NOT wrapped):

 

  $info_box_contents[] = array('text' => '<a href="' . tep_href_link(FILENAME_SHIPPING) . '">' . BOX_INFORMATION_SHIPPING . '</a><br>' .
									 '<a href="' . tep_href_link(FILENAME_PRIVACY) . '">' . BOX_INFORMATION_PRIVACY . '</a><br>' .
									 '<a href="' . tep_href_link(FILENAME_CONDITIONS) . '">' . BOX_INFORMATION_CONDITIONS . '</a><br>' .
									 '<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a><br>' .
									 '<a href="' . tep_href_link(FILENAME_GV_FAQ) '', 'NONSSL') . '">' . BOX_INFORMATION_GV . '</a>');//CCGV

 

I get the following error:

 

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /home/cbear/public_html/store/includes/boxes/information.php on line 27

 

Line 27 is the CCGV line.

 

So, (2) I reverted to my clean original, and then put the line mid-stream as recommended:

 

  $info_box_contents[] = array('text' => '<a href="' . tep_href_link(FILENAME_SHIPPING) . '">' . BOX_INFORMATION_SHIPPING . '</a><br>' .
									 '<a href="' . tep_href_link(FILENAME_PRIVACY) . '">' . BOX_INFORMATION_PRIVACY . '</a><br>' .
									 '<a href="' . tep_href_link(FILENAME_GV_FAQ) '', 'NONSSL') . '">' . BOX_INFORMATION_GV . '</a><br>') . //CCGV
									 '<a href="' . tep_href_link(FILENAME_CONDITIONS) . '">' . BOX_INFORMATION_CONDITIONS . '</a><br>' .
									 '<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a>');

 

No dice. Now I get:

 

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /home/cbear/public_html/store/includes/boxes/information.php on line 25

 

...and indeed, line 25 is the CCGV line.

 

 

 

The server is running PHP 4.4.4, if that makes any difference?

 

Thank you very, very much for your help. :D

 

:D Bailey

Edited by baileysemt123
Link to comment
Share on other sites

And, another question.

 

I have just installed an older version of your contrib dated May, 2006. I guess several updates have come out since then. However there is no changelog indicating which files have been updated in each update.

 

How do I know which files I need to change in order to upgrade my CCGV installation? For instance, I have no check-box to select to redeem a coupon. I guess I am supposed to have one? But it's not present in my version:

 

nocheckbox.gif

 

Not that I mind ;) but it does seem prudent to run the current version, if only in terms of security. Thank you for your advice. :D

 

:D Bailey

Link to comment
Share on other sites

This code is correct. If it doesn't work then the problems lays somewhere else:

<?php
 $info_box_contents = array();
 $info_box_contents[] = array('text' => BOX_HEADING_INFORMATION);

 new infoBoxHeading($info_box_contents, false, false);

 $info_box_contents = array();
 $info_box_contents[] = array('text' => '<a href="' . tep_href_link(FILENAME_SHIPPING) . '">' . BOX_INFORMATION_SHIPPING . '</a><br>' .
									 '<a href="' . tep_href_link(FILENAME_PRIVACY) . '">' . BOX_INFORMATION_PRIVACY . '</a><br>' .
									 '<a href="' . tep_href_link(FILENAME_CONDITIONS) . '">' . BOX_INFORMATION_CONDITIONS . '</a><br>' .
									 '<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a><br>' .
									 '<a href="' . tep_href_link(FILENAME_GV_FAQ, '', 'NONSSL') . '">' . BOX_INFORMATION_GV . '</a>');// CCGV

 new infoBox($info_box_contents);
?>

 

Vger

This is still not fixed, unfortunately. I have tried this a couple of different ways, using the advice you prescribed, to no avail. Here are my results.

 

(1) I changed the coding to put the link at the end of the array, but removed the ; from above as mentioned by others. The code therefore looked like this (my advance apologies for how it wraps on the board; my code is NOT wrapped):

 

  $info_box_contents[] = array('text' => '<a href="' . tep_href_link(FILENAME_SHIPPING) . '">' . BOX_INFORMATION_SHIPPING . '</a><br>' .
									 '<a href="' . tep_href_link(FILENAME_PRIVACY) . '">' . BOX_INFORMATION_PRIVACY . '</a><br>' .
									 '<a href="' . tep_href_link(FILENAME_CONDITIONS) . '">' . BOX_INFORMATION_CONDITIONS . '</a><br>' .
									 '<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a><br>' .
									 '<a href="' . tep_href_link(FILENAME_GV_FAQ) '', 'NONSSL') . '">' . BOX_INFORMATION_GV . '</a>');//CCGV

 

I get the following error:

Line 27 is the CCGV line.

 

So, (2) I reverted to my clean original, and then put the line mid-stream as recommended:

 

  $info_box_contents[] = array('text' => '<a href="' . tep_href_link(FILENAME_SHIPPING) . '">' . BOX_INFORMATION_SHIPPING . '</a><br>' .
									 '<a href="' . tep_href_link(FILENAME_PRIVACY) . '">' . BOX_INFORMATION_PRIVACY . '</a><br>' .
									 '<a href="' . tep_href_link(FILENAME_GV_FAQ) '', 'NONSSL') . '">' . BOX_INFORMATION_GV . '</a><br>') . //CCGV
									 '<a href="' . tep_href_link(FILENAME_CONDITIONS) . '">' . BOX_INFORMATION_CONDITIONS . '</a><br>' .
									 '<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a>');

 

No dice. Now I get:

...and indeed, line 25 is the CCGV line.

The server is running PHP 4.4.4, if that makes any difference?

 

Thank you very, very much for your help. :D

 

:D Bailey

Edited by Vger
Link to comment
Share on other sites

One of the reasons the original CCGv contrib got into such a mess was that people kept posting minor amendments to it without providing a full file set - which is why I prefer (in most cases) to provide a full file-set.

 

Vger

And, another question.

 

I have just installed an older version of your contrib dated May, 2006. I guess several updates have come out since then. However there is no changelog indicating which files have been updated in each update.

 

How do I know which files I need to change in order to upgrade my CCGV installation? For instance, I have no check-box to select to redeem a coupon. I guess I am supposed to have one? But it's not present in my version:

 

nocheckbox.gif

 

Not that I mind ;) but it does seem prudent to run the current version, if only in terms of security. Thank you for your advice. :D

 

:D Bailey

Link to comment
Share on other sites

It says in the Install instructions for CCGV(trad) that all Gift Voucher purchases are 'Queued' before release. This means that you have to manaully go into your admin panel, after making sure that you have actually received the payment, to 'Release' the Gift Voucher from the queue. This was done for security reasons.

 

Vger

We're having a problem that I'm hoping you can help us understand. Most of the products we sell are digital downloads. Once we receive payment on an order, the order is changed to complete so that the customer can receive their downloads immediately.

 

The problem we are having is that when a customer uses the gift voucher and the total amount due is $0.00, the order does not automatically change to complete, but stays at pending (default). We have to manually switch it to complete.

 

Any ideas??

 

TIA!

 

Ashley

Link to comment
Share on other sites

One of the reasons the original CCGv contrib got into such a mess was that people kept posting minor amendments to it without providing a full file set - which is why I prefer (in most cases) to provide a full file-set.

 

Vger

 

*scratches head* OK, that's great, but is sort of beside the point. ;) Where can I find a changelog? A full file set does nothing for me if I don't know what has been changed. It is not reasonable for me to re-upload 78 fresh files + make 28 pages' worth of manual mods every time a new version comes out simply because I don't know where 3 small changes were made. ;) A basic changelog would solve this conundrum. I've never before used a script which didn't have a changelog.

 

I'm not trying to bust any chops here, I love this contrib and offer you the highest compliments for your work. It's wonderful! This mod works far better than I ever imagined! It is far more robust, fancy, functional and customizable than I ever expected. B) :thumbsup: :lol:

 

I'm just fishin' for a changelog so I don't have to spend 6 hours at a crack uninstalling the contrib and then manually reinstalling it. I'm sure you keep notes on what you change so you yourself know what you've done??? How else would a person keep track of development?

 

:D Bailey

Link to comment
Share on other sites

This code is correct. If it doesn't work then the problems lays somewhere else:

 

Thank you for taking the time to look at and consider my error report. In that case I will just ignore that part and not try to install it into the info box. The contrib works fine otherwise, I don't get any other errors when it is used (I have tested it thoroughly), and I don't feel the info box link is essential in my store anyway.

 

:D Bailey

Link to comment
Share on other sites

Where can I find a changelog? A full file set does nothing for me if I don't know what has been changed.

 

You can most likely help yourself by first getting a programm like ExamDiff to compare files and then looking at the dates of the files in the contribution.

E.g. the update Vger made on 28.08. shows files of or around that date and files which may have an older date like january this year.

If for example you installed your contrib in march then you have all the answers you need (I reckon...).

Link to comment
Share on other sites

Hi again Vger,

 

I don't really know how to interpret your silentness. Not a clue what could cause my problem ? busy ? Fed up with tax queries ?

 

I really do want to get this fantastic contribution to work in our online shop which is why I would like to make a suggestion to you.

You help me getting this problem sorted (which btw does not appear if I work without re-calculation) and I thank you with translating your contributions into german if you haven't got somebody to do that for you.

That way I can at least give a bit back to you and the community.

 

Looking forward to your response.

Nala

Link to comment
Share on other sites

Fed up with tax queries ?

 

Got it in one!

 

CCGV(trad) and taxes works fine - unless you wish it to do something it was never written to do in the first place. If you need CCGV(trad) to display tax in a certain way to suit the tax laws in certain countries then I'm afraid you'll have to pay someone to do it for you.

 

Thank you for the offer of translation to German but my business partner is Austrian.

 

Vger

Link to comment
Share on other sites

Got it in one!

 

CCGV(trad) and taxes works fine - unless you wish it to do something it was never written to do in the first place. If you need CCGV(trad) to display tax in a certain way to suit the tax laws in certain countries then I'm afraid you'll have to pay someone to do it for you.

 

Thank you for the offer of translation to German but my business partner is Austrian.

 

Vger

 

ok. that answer was clear :-)

 

Let me just clarify that I do want something this contributition is not made for.

The amount of subtotal incl. tax is fine. It looks like the tax is being based on the right amount of ? 90,-- (? 100,-- net - ? 10,-- net gift voucher) yet instead of 10% Tax (or 16%) only 8,.. % Tax is included in the total.

 

If it needs to be programmed to work that way then I would like to ask you to quote me for doing this. Asking anybody else does not really make sense as too many cooks spoil the broth.

 

greetings from Northern Germany

Nala

Link to comment
Share on other sites

And me again,

 

I just talked to my tax consultant and if we now understood each other correctly I can gladly ask you to ignore my problem/request :-))

 

Nevertheless would I be curious to read whether I wanted something that CCGV (trad) is not designed for.

 

happy smiling regards

Nala

Link to comment
Share on other sites

" too many cooks spoil the broth "

Never a truer word spoken! Look at what happened to the original CCGV.

 

This is still a very cleanly laid out CCGV contribution with all the functions of the original, yet it has stayed away from deviating with thoise ridiculous minor add-ons from every tom, dick and harry who had something to add to it, only to create a problem with some other part of the functionality of it.

 

I give Vger credit for taking this contribution out of the mess it was in before and giving it the profile that it is getting now.

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Link to comment
Share on other sites

Vger:

Hi great contribution, I'm having a small issue I don't see where the 'Release' button is in admin area. The module seems to working fine. One thing I did do was review the entire install.

 

I dont see this directory or file in the contribution:

#47 of Manual install instructions (Install.html):

catalog/admin/includes/boxes/gv_catalog/admin.php

All that is in the contribution is:

catalog/admin/includes/boxes/gv_admin.php

 

Any help would be great I dont see any errors in admin or in store itself when I go in and test purchase a Gift Voucher

 

Best Regards-

Jim

Edited by planetlogic
Link to comment
Share on other sites

That line is incorrect, and has been rectified ready for the next update. It should be: catalog/admin/includes/boxes/gv_admin.php

 

If the Release button is not present then are you sure that you created Gift Vouchers with GIFT as the start of the Model Number?

 

Vger

Link to comment
Share on other sites

hey there, i lost my post, sorry :(

 

anyhow, i hae the coupon mod installed and set to 10% off 35.00 or more

now i made a purchse for 400.00, put in my coupon code and it said that the coupon coudl not be redeemed, please see coupon restrictions, now, last i counted 400 is more than 35 ;)

Link to comment
Share on other sites

What is the 'coupon mod'? Are you talking about CCGV(trad) or something else?

 

Coupon restrictions are imposed when you link them to specific categories of products.

 

Vger

there are around 4 coupon contributions so it must be one of those

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

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