Jump to content
Vger

[CONTRIBUTION] CCGV (trad)

Recommended Posts

Multi-Vendor Shipping... allows your products to be drop shipped from various vendors directly the customers. I installed it and ran into quality issues (w/ the vendors), so I disabled it.

 

After inspecting checkout_confirmation.php, I wonder if it's not an ordering issue... based on the lines repositioned for CCGV?

 

pre-edit version

// load the selected payment module
 require(DIR_WS_CLASSES . 'payment.php');
 $payment_modules = new payment($payment);

 require(DIR_WS_CLASSES . 'order.php');
 $order = new order;

 $payment_modules->update_status();

 if ( ( 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'));
 }

 if (is_array($payment_modules->modules)) {
$payment_modules->pre_confirmation_check();
 }

//MVS start
// load the selected shipping module
if (($total_weight > 0 ) || (SELECT_VENDOR_SHIPPING == 'true')){
include(DIR_WS_CLASSES . 'vendor_shipping.php');
} else {
if ($total_weight > 0 ){
include(DIR_WS_CLASSES . 'shipping.php');
} else {
}
}
//MVS End

//MVS start
// load the selected shipping module
/*  if (SELECT_VENDOR_SHIPPING == 'true') {
include(DIR_WS_CLASSES . 'vendor_shipping.php');
 } else {
include(DIR_WS_CLASSES . 'shipping.php');
 } */
//MVS End
 $shipping_modules = new shipping($shipping);

 require(DIR_WS_CLASSES . 'order_total.php');
 $order_total_modules = new order_total;[/quote]

 

Appended version

// load the selected payment module
 require(DIR_WS_CLASSES . 'payment.php');
 if ($credit_covers) $payment=''; // CCGV
 $payment_modules = new payment($payment);
 require(DIR_WS_CLASSES . 'order_total.php');// CCGV

 require(DIR_WS_CLASSES . 'order.php');
 $order = new order;

 $payment_modules->update_status();
 $order_total_modules = new order_total;// CCGV
 $order_total_modules->collect_posts();// CCGV
 $order_total_modules->pre_confirmation_check();//  CCGV

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

 if (is_array($payment_modules->modules)) {
$payment_modules->pre_confirmation_check();
 }

//MVS start
// load the selected shipping module
if (($total_weight > 0 ) || (SELECT_VENDOR_SHIPPING == 'true')){
include(DIR_WS_CLASSES . 'vendor_shipping.php');
} else {
if ($total_weight > 0 ){
include(DIR_WS_CLASSES . 'shipping.php');
} else {
}
}
//MVS End

//MVS start
// load the selected shipping module
/*  if (SELECT_VENDOR_SHIPPING == 'true') {
include(DIR_WS_CLASSES . 'vendor_shipping.php');
 } else {
include(DIR_WS_CLASSES . 'shipping.php');
 } */
//MVS End
 $shipping_modules = new shipping($shipping);
//Lines below repositioned for CCGV
//  require(DIR_WS_CLASSES . 'order_total.php');
//  $order_total_modules = new order_total;

 

What's MVS?

 

Vger

Share this post


Link to post
Share on other sites

Sorry, you'll have to sort that out for yourself. Basically if you have disabled MVS then why is all of the code for it still in that file? I'd uninstall that add-on completely.

 

Vger

Share this post


Link to post
Share on other sites

Hello,

 

I've installed ccgv last version 5.18 on ms2.2, I didn't install the coupon, I just want to install the gift voucher.

 

On the total order module side, the GV is set on 740 and the total is set on 900.

I use Paypal ipn.

My concern is that the calculation of the total order is wrong, both in checkout_confirmation and in paypal. The gift voucher amout is doubled systematically. So if the GV is 30 USD, it deducts 60 USD. It is counted twice.

I've tried many combination in "total order module", but nothing works.

 

Other problem, if the result of the order is 0, it leads anyway to the paypal page, which give on the paypal side an error message. A 0 usd order should not lead to paypal.....

 

Hard to find someone with the same problems. Do you have any idea ?

Thanks,

 

Stephane

Share this post


Link to post
Share on other sites

This is the support thread for CCGV(trad) and not the other CCGV. You need to repost in their thread.

 

Vger

Share this post


Link to post
Share on other sites
This is the support thread for CCGV(trad) and not the other CCGV. You need to repost in their thread.

 

Vger

Sorry for that, I'll do,

regards

stef

Share this post


Link to post
Share on other sites

New update coming soon. Courtesy of Terra (Edith) Need to do some further testing before releasing it.

 

When CCGV was brought out it hacked the basic osCommerce 'Downloads' functionality by adding the 'virtual_weight' function, which created problems further down the road. In certain circumstances if downloads are enabled, if the product is zero weight and has attributes and skips the Shipping page then no Tax is applied - because tax is based on the delivery address (no shipping=no delivery).

 

This update will fix that, and tax will be added based on either the billing or shipping address.

 

Vger

[/

 

I was wondering if this update when it comes available will help with my problem.

 

When downloads are enabled and a customer adds a product to the cart then logs in the cart skips the shipping method part. If you go to the store log in then place products in the cart the shipping method works/shows properly.

 

I currently had to disable downloads and forget about the vouchers for now because of this issue and all works well.

 

Wendy

Share this post


Link to post
Share on other sites

Hi Wendy, I just posted to the separate thread I created related to this problem before I realized it was most likely a CCGV-related problem. I'll re-post here, and I'm sorry that I've got to run right now and can't completely test what I'm suggesting:

 

There are two places in checkout_shipping.php where redirects to checkout_payment occur. The first involves a change related to CCGV where line ca. 52 in the osCommerce default file

 

if ($order->content_type == 'virtual') {

 

is replaced by

 

if ( (DOWNLOAD_ENABLED == 'true') && ($cart->weight == 0) ) { // Edited for CCGV

 

If the problem is here, it would also explain why disenable download fixes the problem - so long as you're not using virtual products.

 

I don't have enough time to trial and error it right now, but my first guess is that $cart->weight == 0 is wrong and should be amended along the lines of the show_weight function used to arrive at $total_weight a few lines later:

 

$total_weight = $cart->show_weight();

 

The second redirect occurs in relation to the free_shipping module. I could imagine possible interactions here also, but I'd have to examine the related files and definitions.

Share this post


Link to post
Share on other sites

Just to be clear, I'd try putting the variable declaration

 

$total_weight = $cart->show_weight();

 

before line 52 (or whatever it is in your checkout_shipping.php), then edit line 52 (now line 53 or so) as follows

 

if ( (DOWNLOAD_ENABLED == 'true') && ($total_weight == 0) ) { // Edited for CCGV

 

then again, maybe it's something totally different - I'm just hacking away...

Share this post


Link to post
Share on other sites

You may just want to wait until I have the time to do the new release.

 

Vger

Share this post


Link to post
Share on other sites

I have just installed this contribution and it works fine with one exception. The coupon amount is not being deducted from the order total. Example: item price $439, subtotal $439, discount $87.80, total $439. Can anyone advise how to correct this problem? Thank you!

Share this post


Link to post
Share on other sites
I have just installed this contribution and it works fine with one exception. The coupon amount is not being deducted from the order total. Example: item price $439, subtotal $439, discount $87.80, total $439. Can anyone advise how to correct this problem? Thank you!

 

Does this mean my "apply_credit()" function is not working? Can anyone lead me in the right direction?

Share this post


Link to post
Share on other sites

Have you altered the Sort Order under Modules --> Order Total at all - away from their default settings?

 

Vger

Share this post


Link to post
Share on other sites
Have you altered the Sort Order under Modules --> Order Total at all - away from their default settings?

 

Vger

 

 

I'm not sure because I've added several contribs and mods, but I fixed the sort order and that did it. Thank you so much!

Share this post


Link to post
Share on other sites

Hello Everyone:

 

First off, let me say how fantastic this contribution is!!! I started out with that other version, I like to forget the name, the Credit Class and Gift Voucher and ugh, problems galore. Turned to CCGV(trad), poof, problems be gone. :)

 

Ok, few questions though. I'm using PWA, Points and Rewards, Gift Registry, Wish List, multiple Payment contributions, etc..etc...etc...No major issues or errors so far (*knocks on wood!)

 

QUESTIONS:

 

1) Is there a way to prevent users from using Gift Vouchers and/or Coupons for buying Gift Vouchers?

 

2) I almost have this figured out but wanted to post this question anyways...Has anyone figured a solution to track balances of Gift Certificates for non-registered users?

 

3) Will turning the queue option to False for auto-queing automatically process the Gift Vouchers? (have yet to test whether or not this is so)

 

4) Regards to Question #1, if someone wanted to buy a gift certificate and a product or two at once (actual goods), is there a way to have any Vouchers or Coupons applied not affect what is required for payment on the Gift Voucher being purchased? Such as, if Customer A decides to buy a $10 Gift Voucher, $15 Movie, and a $12 Book (all totalling $37), and uses part of their $30 balance from their account for this purchase, that only the $15 Movie and $12 Book would be covered. This would end up giving the customer a $3 balance of credit left over but still requiring to pay $10 for the Gift Voucher. Required to pay because Gift Vouchers are restricted from being purchased with Gift Vouchers. ALL THAT SAID, hehehe....Is this possible? If so, anyone have a direction to guide me in or anything?

 

5) Does anyone have any add-on or feature for their shop that tracks Customers birthdays? My goal here is that I'd like to send customers a $5 Gift Voucher (good for either the month of their b-day or 1-month from their birthday). Anyone?

 

6) Perhaps I have just fried my brain a bit and overlooked this answer but I was wondering if anyone knew what the purpose of enabling Downloads to True had on the affects, what it does, etc...for the CCGV(trad) (the fantastic!) contribution?

Share this post


Link to post
Share on other sites
1) Is there a way to prevent users from using Gift Vouchers and/or Coupons for buying Gift Vouchers?

 

2) I almost have this figured out but wanted to post this question anyways...Has anyone figured a solution to track balances of Gift Certificates for non-registered users?

 

3) Will turning the queue option to False for auto-queing automatically process the Gift Vouchers? (have yet to test whether or not this is so)

 

1) on the original download from Vger, no.

 

2) that is specific to PWA, how can someone who is not a member have an account balance for CCGV when they can't have one for normal account_history.php?

 

3) the auto release is from the other CCGV not trad. it was taken out of the trad release for security reasons.

 

4) at the moment, no.. can't be done.

 

5) there is a birthdays contribution with a cron's job file attached which auto sends emails on birthdays, you can modify it allowing it to pull pre-made coupon codes from admin if you want.

 

6) i don't understand the question

Edited by chooch

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

Share this post


Link to post
Share on other sites

6. 'Downloads' (and enabling them) deals with non-physical i.e. 'virtual' items which don't require Shipping. This is why it has to be enabled for CCGV(trad) to work.

 

Vger

Share this post


Link to post
Share on other sites

Will this contribution conflict with the kgt-discount coupons module that I have already installed and is functioning well for me?

Share this post


Link to post
Share on other sites

Hi,

 

I want to thank you so much for this contribution, my only question is that at one time everything was working fine & now all the sudden when someone orders the gift voucher and pays through Paypal I show nothing in the que for that voucher nor does customer receive the email.

 

 

But if I use check and or money order to pay then it shows up (in que and email) ... I went through the files and checked to see if all was ok and it appears to be... *but of course I could have missed something*.

 

I also went through this forum for some guidance but I couldnt find an answer so please forgive if you already answered this but can you please and thank you direct me to what might have went wrong.

 

Many thanks!

Lexi

Share this post


Link to post
Share on other sites
Hi,

 

I want to thank you so much for this contribution, my only question is that at one time everything was working fine & now all the sudden when someone orders the gift voucher and pays through Paypal I show nothing in the que for that voucher nor does customer receive the email.

But if I use check and or money order to pay then it shows up (in que and email) ... I went through the files and checked to see if all was ok and it appears to be... *but of course I could have missed something*.

 

I also went through this forum for some guidance but I couldnt find an answer so please forgive if you already answered this but can you please and thank you direct me to what might have went wrong.

 

Many thanks!

Lexi

have you added the CCGV code in the IPN module?


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

Share this post


Link to post
Share on other sites

Recently we installed Protx_Direct 2.0 contribution. I have just noticed that for some reason our CCGV that we have installed is now not working. When you try to redeem the coupon code it says that it has redeemed it but it never takes it off of the final price.

Can anyone help or point me in the right direction.

 

regards

Nick

Share this post


Link to post
Share on other sites
our CCGV

 

If that's not CCGV(trad) then you need to go to the other forum thread for CCGV - but Id take a look at your Sort Order under Modules --> Order Total.

 

Vger

Share this post


Link to post
Share on other sites

No, I'm happy to say that the contribution you are using is not CCGV(trad). The reason I put CCGV(trad) together in the first place was because the one you are using is in a mess.

 

Those settings should work, unless you have installed something else which has modified checkout_process.php.

 

Vger

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

×