Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Credit Class/Gift Vouchers/Discount Coupons 5.10


Strider

Recommended Posts

A programmer has installed CCGV 5.13b and i want to fully test it out. What functions should i test. Some sort of checklist.....

 

This is what i have come up with so far.

 

All admin functions

Welcome amount voucher

send voucher to friend

coupon details link

redeemable coupon

coupon + voucher checkout

checkout confirmation with all calculations, email as well

correct coupon heading when redeeming

 

Any more?

That's a good list. I'm trying to remember all the ways I screwed it up the first time :lol:

 

Try doing stuff you're not supposed to do, too, like:

Try to use a discount with a purchase below minimum order

Try to use a discount on a category that isn't listed

List one coupon use per customer, and try and use the code more than once.

Try to redeem a coupon with free shipping enabled. (The version you installed, version 5.13b by Gyakutsuki should enable you to do this.)

 

I assume by admin functions, that you mean setting all the variables (i.e. whether or not to include shipping or tax in calculations, etc.)

That's all I can think of right now.

Link to comment
Share on other sites

  • Replies 4.8k
  • Created
  • Last Reply

Top Posters In This Topic

Quentin:

 

If you alter this function, you're "undefining" the function in includes/application_top.php

 

When you click on links to product in the shopping cart, for example, it gives a fatal error.

 

Am I missing something?

 

Maybe - its not replacing the tep_get_product_path, its a new function that returns a list of all categories and their parents that a product belongs to.

 

Any exsting call to tep_get_product_path excepth the one in ot_coupon should be left as is.

 

cube

Link to comment
Share on other sites

I'm really frustrated by this issue. I did not have this problem until I installed CCGV 5.13. Here's what I see when you view the shopping_cart.php page when you have items in your cart that do not have any attributes:

 

Warning: Variable passed to each() is not an array or object in /hsphere/local/home/diskolog/diskology.com/catalog/shopping_cart.php on line 65

Warning: Variable passed to each() is not an array or object in /hsphere/local/home/diskolog/diskology.com/catalog/shopping_cart.php on line 65

 

And under each product (with no attributes) in the list I get these:

Warning: reset(): Passed variable is not an array or object in /hsphere/local/home/diskolog/diskology.com/catalog/includes/modules/order_details.php on line 83

Warning: Variable passed to each() is not an array or object in /hsphere/local/home/diskolog/diskology.com/catalog/includes/modules/order_details.php on line 84

 

If the product has an attribute then there are no errors. The warnings reference this code within shopping_cart.php:

 

// Push all attributes information in an array
     if (isset($products[$i]['attributes'])) {
       while (list($option, $value) = each($products[$i]['attributes'])) {
echo each($products[$i]['attributes']);  
echo tep_draw_hidden_field('id[' . $products[$i]['id'] . '][' . $option . ']', $value);
         $attributes = tep_db_query("select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix
                                     from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa
                                     where pa.products_id = '" . $products[$i]['id'] . "'
                                      and pa.options_id = '" . $option . "'
                                      and pa.options_id = popt.products_options_id
                                      and pa.options_values_id = '" . $value . "'
                                      and pa.options_values_id = poval.products_options_values_id
                                      and popt.language_id = '" . $languages_id . "'
                                      and poval.language_id = '" . $languages_id . "'");
         $attributes_values = tep_db_fetch_array($attributes);

         $products[$i][$option]['products_options_name'] = $attributes_values['products_options_name'];
         $products[$i][$option]['options_values_id'] = $value;
         $products[$i][$option]['products_options_values_name'] = $attributes_values['products_options_values_name'];
         $products[$i][$option]['options_values_price'] = $attributes_values['options_values_price'];
         $products[$i][$option]['price_prefix'] = $attributes_values['price_prefix'];
       }
     }

 

I can only guess that one of the items that is pulled from the database and that is part of the array is not in the proper format or the array itself is getting setup incorrectly.

 

I originally thought that there were fields that were improperly formatted, but I went through all the relevent fields and compared them to the osc docs and with the oscommerce.sql script and they all seem to be as they should. Then...

 

I copied the store files from this server (unix) and installed a fresh DB with only the default products on a Win 2K server and saw the same Warning messages. So, I'm more convinced now that there is a problem in the php code somewhere rather than a databae formatting issue.

 

Any ideas?

Link to comment
Share on other sites

// Push all attributes information in an array
     if (isset($products[$i]['attributes'])) {
       while (list($option, $value) = each($products[$i]['attributes'])) {

 

Hi,

 

Not sure where I got it from, but my 'if' statement is:

 

 if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) {

 

This will certainly stop the 'each' error, but I'd check that discounts/coupons continue to work as expected for priced attributes, just to make sure.

 

Quentin

Link to comment
Share on other sites

Hi,

 

I have the coupon above the CC info, which is why I did it that way.

 

I'll check what happens if I follow your sequence.

 

Quentin

 

Hi,

 

I tried that sequence

 

CCard Info & voucher -> Redeem -> CCard Info -> Continue

 

and the voucher details showed correctly in Order Confirmation.

 

Not sure what to suggest :(

 

Quentin

Link to comment
Share on other sites

This topic is getting too big and I can't find an easy way to search the whole 117 pages, so I just put my questions here, hopefully someone asnwer me

 

I installed this contributions and everything works great. However, I noticed that when my customer enter the coupon code and redeem it, it does not record these discount right. I only see some of the discounts are being recored in the coupon_redeem_track, and not all. Why is this? Anyone shed me some lights as I am getting confused here.

 

Thanks

Link to comment
Share on other sites

I am going to redo my store and I want to install this module. I have downloaded it and I see there are several fixes for it... can someone tell me which ones to install to ensure I have them all?

 

It looks to me that this one 24 May 2005 - CCGB V5.13b by Gyakutsuki

is a full package but does it include teh fixes by Rigadin on 18 May 2005 - Update 5.13a

 

I am assuming the ones that came after are not included.. please guide me thanks!

 

maddie

Link to comment
Share on other sites

I am going to redo my store and I want to install this module. I have downloaded it and I see there are several fixes for it... can someone tell me which ones to install to ensure I have them all?

 

It looks to me that this one 24 May 2005 - CCGB V5.13b by Gyakutsuki

is a full package but does it include teh fixes by Rigadin on 18 May 2005 - Update 5.13a

 

I am assuming the ones that came after are not included.. please guide me thanks!

 

maddie

CCGB V 5.13b by Gyakutsuki includes the fixes by Rigadin. However, he didn't fix the typos in the script. The next contribution fixes those typos, but doesn't include the files by Gyakutsuki or Taryn. So I compiled it all into a new version. So there you go.

CCGV V5.13c

Link to comment
Share on other sites

getting this error on the payment information screen after redeeming a coupon:

 

MODULE_ORDER_TOTAL_COUPON_TEXT_ERROR

 

It appears right above the "Congratulations, you have redeemed' box

 

Any ideas?

Link to comment
Share on other sites

Hi,

 

Not sure where I got it from, but my 'if' statement is:

 

   

 if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) {

 

This will certainly stop the 'each' error, but I'd check that discounts/coupons continue to work as expected for priced attributes, just to make sure.

 

Quentin

 

Hi Cube, many thanks for your reply. That if statement seemed to have fixed the two warnings that were listing for each(), but I still see errors listed under each product which do not use attributes:

Warning: reset(): Passed variable is not an array or object in /hsphere/local/home/diskolog/diskology.com/catalog/includes/modules/order_details.php on line 83

Warning: Variable passed to each() is not an array or object in /hsphere/local/home/diskolog/diskology.com/catalog/includes/modules/order_details.php on line 84

 

Could it be getting some incorrect variable settings from /catalog/includes/boxes/shopping_cart.php?

 

Thanks again!

Link to comment
Share on other sites

just installed the 5.13c package of ccgv and installation is compleet

 

In admin center now there is an entry for Vouchers/Coupons but if I click one of the links( say ex: Coupon Admin ) I get a 404 error saying file "shop/admin/FILENAME_COUPON_ADMIN" is not found.

 

I've looked into the php file "shop\admin\includes\boxes\gv_admin.php" and could not find a noticable problem.

 

 

Also In the admin section/configuration I can see the options needed for setting the proper values but I see them twice, and I see the french and english menu items instead of only the english items as supposed to ( running english version for test )

 

 

Should I have first installed the 5.13 version and then the 5.13c version ?

Edited by jans
Link to comment
Share on other sites

Hi,

 

I have just installed the latest version of the system however theres something wrong.

 

Firstly catalog/includes/add_ccgvdc_english.php and admin/includes/add_ccgvdc_english.php we missing, but I added in the ones from a previous download (v5.11).

 

Now, however, every time I load up the site I get the following message:

 

Fatal error: Cannot redeclare create_coupon_code() (previously declared in /home/epp/public_html/osc/includes/functions/general.php:17) in /home/epp/public_html/osc/includes/add_ccgvdc_application_top.php on line 36

 

Does anyone have any suggestions?

 

Thanks

 

 

Will

Link to comment
Share on other sites

I noticed this files for admin and catalog are not in there... do I not need them? 

 

catalog/includes/languages/add_ccgvdc_english.php

admin/includes/languages/add_ccgvdc_english.php

Yes, you do. I should have double checked the version by Gyakutsuki before compiling it to make sure it was complete. I've uploaded the corrected version now. Sorry.

Link to comment
Share on other sites

Hi,

 

I have just installed the latest version of the system however theres something wrong.

 

Firstly catalog/includes/add_ccgvdc_english.php and admin/includes/add_ccgvdc_english.php we missing, but I added in the ones from a previous download (v5.11).

 

Now, however, every time I load up the site I get the following message:

 

Fatal error: Cannot redeclare create_coupon_code() (previously declared in /home/epp/public_html/osc/includes/functions/general.php:17) in /home/epp/public_html/osc/includes/add_ccgvdc_application_top.php on line 36

 

Does anyone have any suggestions?

 

Thanks

Will

You're missing some files. You need the files for v5.13, not 5.11. The new update has the missing files that are current. Also, check the instructions in v5.13 to make sure you edited the catalog/includes/functions/general.php correctly. That file is in v5.13d too.

Link to comment
Share on other sites

just installed the 5.13c package of ccgv and installation is compleet

 

In admin center now there is an entry for Vouchers/Coupons but if I click one of the links( say ex: Coupon Admin )? I get a 404 error saying file "shop/admin/FILENAME_COUPON_ADMIN" is not found.

 

I've looked into the php file "shop\admin\includes\boxes\gv_admin.php" and could not find a noticable problem.

Also In the admin section/configuration I can see the options needed for setting the proper values but I see them twice, and I see the french and english menu items instead of only the english items as supposed to ( running english version for test )

Should I have first installed the 5.13 version and then the 5.13c version ?

 

 

Anyway, I just did a fresh reinstall of the shop and implemented ccgv, after that I implemented RMA systems and auto-backup.

 

All seemed to be working OK until I tryed to create an account.

 

after creation I get a blank screen, then when I get back the account IS created ( so far just a little problem I guessed )

 

But after logging in on that account I get an error stating a Db called ".table_coupon_gv_customer' " does not exist.

 

I know IT DOES EXIST and I looked for it with my sql manager and found it ( knew it should be there )

 

Why do I keep getting this error, I've completely distroyed my previous shop looking for the problem and therefore I've set up a clean install to test various problems with, but as it seems now this one is been made useless too by installing one of the above together with ccgv.

 

PS. The error is only visible in the right box at the top, all other boxes now are unvisible.

 

gr. Jans

Edited by jans
Link to comment
Share on other sites

You're missing some files.  You need the files for v5.13, not 5.11.  The new update has the missing files that are current.  Also, check the instructions in v5.13 to make sure you edited the catalog/includes/functions/general.php correctly.  That file is in v5.13d too.

 

 

v 5.13d :'( where do I find this update, all I can find is 5.13c-1

Link to comment
Share on other sites

Uh,  I DL the 5.13c-1 file BUT, uh, I think I am going blind.

 

The files are not there, or I am too drunk to see them  :P

No, you weren't drunk (or rather too drunk to see them, that is :P). They weren't in there, so that's why I uploaded another version. I thought I was going batty too. I guess we're drinkin' the same thing, jans! :lol:

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