cpgShop - a PayPal shopping cart - Page 17 cpgShop - a PayPal shopping cart - Page 17
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

cpgShop - a PayPal shopping cart

Started by Stramm, October 11, 2010, 05:04:51 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

staniwr

Hey Stramm, I want to donate to get the full version.  I need to PayPal IPN ...

sntechsnaps

Hi all,

Recently updated MySQL to 5.6.14 and CPGShop is now showing an error when customers go to complete an order:

Critical error
There was an error while processing a database query

While executing query 'INSERT INTO `cpg15x_cpgshop_order`
                   (`oid`, `user_id`, `user_name`, `gross`, `item_count`, `cart`, `profile`, `time`, `status`, `txnid`, `payment`, `delivery`, `tax`, `log`, `note`, `tos`, `cdown`, `cship`, `paid`, `sent`, `new`, `archive`)
                   VALUES
                   ('','1', 'administrator', '41.48', // edited to remove name and address details etc // '1', '0', '1', '', '', '1', '1');' in plugins\cpgshop\libs\cpgDB.class.php on line 24

mySQL error: Incorrect integer value: '' for column 'oid' at row 1

Any ideas how I can fix this?

mboesen

Hello

I have been trying to see the documentation, but ends up with some download or watch option, that looks strange...

So here is my question. I have tried to activivate the possibility to download purchased images. It all seems to work ok and I get an email with a link and a password to my download directory...

But where do I locate that Directory???

The site is:
http://boesenfoto.dk/gallery/index.php

Thanks in advance...

DesMas

Quote from: sntechsnaps on October 13, 2013, 07:49:26 PM
Hi all,

Recently updated MySQL to 5.6.14 and CPGShop is now showing an error when customers go to complete an order:

Critical error
There was an error while processing a database query

While executing query 'INSERT INTO `cpg15x_cpgshop_order`
                   (`oid`, `user_id`, `user_name`, `gross`, `item_count`, `cart`, `profile`, `time`, `status`, `txnid`, `payment`, `delivery`, `tax`, `log`, `note`, `tos`, `cdown`, `cship`, `paid`, `sent`, `new`, `archive`)
                   VALUES
                   ('','1', 'administrator', '41.48', // edited to remove name and address details etc // '1', '0', '1', '', '', '1', '1');' in plugins\cpgshop\libs\cpgDB.class.php on line 24

mySQL error: Incorrect integer value: '' for column 'oid' at row 1

Any ideas how I can fix this?

Hi

That may be related with one of the mysql 5.6 changed to auto increment columns => problem here the '' for the oid column should be set to null

Try to change the query defined in plugins\cpgshop\libs\cpgHTML.class.php @ line 944 to
Code (PHP) Select

$result = cpgDB::runQuery("INSERT INTO `{$CONFIG['TABLE_CS_ORDER']}`
    (`oid`, `user_id`, `user_name`, `gross`, `item_count`, `cart`, `profile`, `time`, `status`, `txnid`, `payment`, `delivery`, `tax`, `log`, `note`, `tos`, `cdown`, `cship`, `paid`, `sent`, `new`, `archive`)
    VALUES
    (NULL,'" . USER_ID . "', '" . USER_NAME . "', '" . (float)$gross . "', '" . (int)$item_count . "', '" . serialize($cpgshop->cart) . "','" . serialize($cpgshop->profile) . "','" . $time . "', 'ordered', '', '" . $cpgshop->profile['gateway']['method'] . "', '" . $cpgshop->profile['delivery']['method'] . "', '" . (float)$CONFIG['cpgshop_tax_fee'] . "', '', '$additional_info', '" . $tos . "', '" . $download . "', '" . $shipping . "', '', '', '1', '1');");


Note: not tested yet.

DesMas

Quote from: mboesen on November 06, 2013, 10:13:21 AM
Hello

I have been trying to see the documentation, but ends up with some download or watch option, that looks strange...

So here is my question. I have tried to activivate the possibility to download purchased images. It all seems to work ok and I get an email with a link and a password to my download directory...

But where do I locate that Directory???

The site is:
http://boesenfoto.dk/gallery/index.php

Thanks in advance...

Hi

The gallery creates an download folder inside the /albums directory (config variable 'fullpath') if not existing
Then creates inside a folder named like "UserId"_"OrderId"

Does this help you?

mboesen

Quote from: DesMas on November 12, 2013, 08:44:52 PM
Hi

The gallery creates an download folder inside the /albums directory (config variable 'fullpath') if not existing
Then creates inside a folder named like "UserId"_"OrderId"

Does this help you?

I receive an email with username and password and a link. When clicking the link it just open a blank version og my Coppermine Gallery. No directory....

I located an folder called download on my FTP with a subfolder called gallery/albums/downloads/1_51 with a index.html file.. Entering that url... I get the opportunity to enter the username/password.... which apparantly works, but just opens a blank (all white) web page

DesMas

#326
This sounds like two problems
- one with the mail
- one with the download folder

I'll try to check this

I'm a little bit confused... the download link in the mail references a "dead" function:
Code (PHP) Select

    // -----------------------------------------------------------------------------------------
    // PROCESS THE DOWNLOADS
    // -----------------------------------------------------------------------------------------
    function process()
    {
       return;
    }

Stramm, is this as it should be?

Stramm

QuoteThe plugin in its basic version doesn't come with PayPal IPN nor with digital image download support.

DesMas


DesMas

Hi stram

Have you planned an option to activate multiple price sets per album.
For example if i have:

  • one set for pictures do be printed
  • one set for coffee cups
I can only activate one set at a time per album.

As workaround the sets have be created with mixed contents what does not satisfy me.

If not, or it's not part of the full version, I would try to implement this myself.
Might be some kind of tricky, with the option groups but I'm not using them at the moment.


mboesen

Quote from: Stramm on November 15, 2013, 08:36:04 AM


Ok, that explain it ;-)

How much is the full version and how do I go about getting it?

mboesen

Please contact me for details about getting a full version

JohannM

Maybe I am just plain stupid ... but I have tried various ways to have both "Printed" and "Download" options ... but It just give me one option ...

What I want to do below the image where you have the "Add to shopping Basket" the following options:

* Download Options : Downlaod This Image  $ 10.00
                              Download Complete Album $ 125.00

* Printed Options : Postcard Print $ 5.00
                          A 5 Print $ 25.00
                          A 4 Print $ 35.00

Can someone tell me how to do this ? Please.


PhilD_UK

Hi All,
I'm new to both Coppermine and cpgshop, so please be gentle.

Both programs are superb .... better than anything else I have tried. (And I have tried a few in the last three weeks!). I bow to the programmers .... :)

I have a gallary working fine, but can't get the price options to work in the shopping cart. I have tried looking for the "help" documentation and only get broken links. Has anyone a download of the help files that they can forward to me, or is there another link?

Or failing that, can someone please post an idiots guide on how to set them up?

DesMas

Hi PhilD_UK, Hi JohannM

As I posted three entries above, I also have my trouble with the price sets.
It seems to me that this is not working correctly.

Sadly, Stramm is not able to participate as often as he wants, for some personal reasons.
He wants to bring up a new documentation as soon as possible, but this still may take some time.

So I noted for myself to take a look into the code over Christmas time but I cannot say how far I will get.

PhilD_UK

Hi again,
Sorry to bump a post, but I really need some help with setting up the price options for the shopping cart.
I have tried all sorts of settings, but without some sort of documentation I am lost.
Can anyone help with basic settings for 4 print options (6x8, 10x8, 12x10, 16x12) and four prices?
I really need to have this set up by the end of the weekend ...
Also, should the shopping cart be available to view (with contents) to all even if the album is password protected and you are not logged in?

gmc

Been a while since I set this up... but a 'Quick Start' list:
Likely more than one way to group things - I'm basing this on what I did... you need to determine if it is suitable for your needs...

Start in CPGSHop Configuration:
In Price Manager - Add a line for each size print you want with Title like '8x10 Print', the price, any additional shipping charge for the item, and select download or ship as type.

In Price Set Manager - add a price set Title like 'Color Prints' - and highlight each price item you want included in the price set.

In Option Manager - add a line for each option you want them to select from. I've used this for print finish as example with Title of 'Finish', Title ( it1||it2||it3 ) of Matte||Gloss and Value ( vl1||vl2||vl3 ) of 0||0  (no extra charge for either in my case - but this would be the cost...)

In Option Manager Set - add an option set Title like 'Prints' and highlight each option you want included in this set...

OK... hard part done...
Now go to your album list view - and each album should have a button 'Enable/Disable CPGShop for pics in an album'
Click...
For all pics in album, use top entry... Or you can choose individual pictures...
Select an available Price Set and Option Set for each - and click th Edit button (either just below the 'all' info - or at the bottom of page if doing individually.

That should do it...  When you view an intermediate image now - you should see the CPGShop options below the image.

If you go to:
http://greggallery.gmcdesign.com/index.php?cat=17 - select the 2013 album to see a very simple (one price/one option) setup - or the 2012 album, I just activated a more detailed setup with additional choices to demonstrate.

Note I did make one change to CPGShop - you will not see the 'View Cart' button until something is actually in the cart... Personal Preference.

Remember the download and Paypal automation is NOT included in the base plugin...
You can still take an order with the option of download - but you will need to handle making the image available for downloading...

Hope that helps!
Thanks!
Greg
My Coppermine Gallery
Need a web hosting account? See my gallery for an offer for CPG Forum users.
Send me money

PhilD_UK

Quote from: gmc on January 03, 2014, 01:13:24 AM
Been a while since I set this up... but a 'Quick Start' list:
Likely more than one way to group things - I'm basing this on what I did... you need to determine if it is suitable for your needs...

Start in CPGSHop Configuration:
In Price Manager - Add a line for each size print you want with Title like '8x10 Print', the price, any additional shipping charge for the item, and select download or ship as type.

In Price Set Manager - add a price set Title like 'Color Prints' - and highlight each price item you want included in the price set.

In Option Manager - add a line for each option you want them to select from. I've used this for print finish as example with Title of 'Finish', Title ( it1||it2||it3 ) of Matte||Gloss and Value ( vl1||vl2||vl3 ) of 0||0  (no extra charge for either in my case - but this would be the cost...)

In Option Manager Set - add an option set Title like 'Prints' and highlight each option you want included in this set...

OK... hard part done...
Now go to your album list view - and each album should have a button 'Enable/Disable CPGShop for pics in an album'
Click...
For all pics in album, use top entry... Or you can choose individual pictures...
Select an available Price Set and Option Set for each - and click th Edit button (either just below the 'all' info - or at the bottom of page if doing individually.

That should do it...  When you view an intermediate image now - you should see the CPGShop options below the image.

If you go to:
http://greggallery.gmcdesign.com/index.php?cat=17 - select the 2013 album to see a very simple (one price/one option) setup - or the 2012 album, I just activated a more detailed setup with additional choices to demonstrate.

Note I did make one change to CPGShop - you will not see the 'View Cart' button until something is actually in the cart... Personal Preference.

Remember the download and Paypal automation is NOT included in the base plugin...
You can still take an order with the option of download - but you will need to handle making the image available for downloading...

Hope that helps!

This worked a treat!! Thank You!

As I had a basic price list, I didn't include any option sets, and it let me order right through to Paypal login.
Thanks very much!.

I would like to hide the empty cart button as well .... could you please tell me what to change in the coding? (preferably in basic steps if possible ... coding is a mystery to me).

Had a play with your site, and I notice that you also require users to login/register ... I take it that is a requirement of Coppermine? Though having enabled "save cart" that could be a bonus.

Thanks again

Philip

gmc

You're welcome.. Glad it worked for you...

To suppress display of 'view cart' button when the cart is empty - in codebase.php:
find:

  //Add view cart & checkout buttons
  if ($item_in_cart > -1 && $CONFIG['cpgshop_enable']) {

and replace with: (just changing -1 to 0... with comments)

  //Add view cart & checkout buttons
  //* GMC - alter compare to suppress cart and checkout buttons if cart is empty..
  if ($item_in_cart > 0 && $CONFIG['cpgshop_enable']) {  //* GMC changed compare to > 0

Remember you will need to redo this change any time you upgrade CPGShop.

CPGShop requires registration/login to process a shopping cart. It adds several columns to the cpg_users table containing name, address, phone to be able to process an order - and that table is only populated when a user registers.
I've had too many problems with 'false' registrations by spammers - adding id's to my gallery - so registrations are now password protected as well.  That's a tradeoff of course - as I have to provide the password those wishing to register. My usage so far has been targeted at specified groups - so been simple to provide the password to the group with the ordering instructions.
Thanks!
Greg
My Coppermine Gallery
Need a web hosting account? See my gallery for an offer for CPG Forum users.
Send me money

PhilD_UK

Thanks for your quick reply.
I'll add the code when I get a moment.

As my target audience is primarily schools and private functions, any password protection is probably a good thing in retrospect. It will also allow traceability of users, as the link will only be given to clients.

Regarding my PM to you regarding the welcome box .... I sorted that ... "anycontent.php" solved my problem.
The more I dig around the forum, the more I learn .... so thank you to all contributors!