Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Trouble with Vouchers

The Open Page

Recommended Posts

I am trying to install and configure CCG v1.51a and I am a wee bit stuck.


I am following the instructions in the readme that comes with the install zip and I am getting the following error when I try to create a discount voucher.


Coupon Name Coupon Amount Coupon Code Status Action

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-20, 20' at line 1


select coupon_active, coupon_id, coupon_code, coupon_amount, coupon_minimum_order, coupon_type, coupon_start_date,coupon_expire_date,uses_per_user,uses_per_coupon,restrict_to_p

roducts, restrict_to_categories, date_created,date_modified from coupons where coupon_active='Y' and coupon_type != 'G' limit -20, 20



Any clues anyone?

Link to comment
Share on other sites

Thank you very much for that pointer, I now get the following error message at the top of the page.

Warning: I am not able to write to the sessions directory: /var/www/vhosts/theopenpage.net/httpdocs/catalog/tmp. Sessions will not work until the right user permissions are set.


Am I right in assuming I need to speak to my webhost about this?

Link to comment
Share on other sites

no, use your ftp program or your host's cpanel. Go to




create a directory called




then with the osc admin goto Configuration->Sessions->Session Directory. Click edit and type in the input box




Then open the catalog\includes\configure.php last line of the file set it to


  define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'

so your sessions will be stored in the database. However it's good to have a valid path for sessions and outside the website folders.

Link to comment
Share on other sites

Ok I'm getting there, I have loaded a voucher (discount) and got my email through to say it's there, I then go to order an item and expect to see a box to enter the coupon code. Only I don't see one, have I missed something?

Link to comment
Share on other sites

for the ccgv you could check the contribution support thread. For the password use your host's cpanel to protect the osc admin directory. Finally for the image upload what kind of error are you seeing?

Link to comment
Share on other sites

Error: Catalog images directory is not writeable: /var/www/vhosts/theopenpage.net/httpdocs/catalog/images/


I've checked on the cp at my site and I'm seeing permissions as rwx r-x r-x My *nix memories are a bit rusty but I think that means it is writeable. I may be wrong though.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...