Advanced search  

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

Pages: [1] 2 3 4 5 ... 30   Go Down

Author Topic: Shopping cart  (Read 650947 times)

0 Members and 2 Guests are viewing this topic.

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Shopping cart
« on: June 04, 2006, 09:02:32 am »

outdated
new version: http://forum.coppermine-gallery.net/index.php/topic,57206.0.html

demo: http://stramm.st.funpic.org
supported languages atm: english, german, dutch, italian, polish


This plugin adds a shopping cart to CPG. Users can add single pictures to their shopping carts or bundle a CD.
You can set different price levels for CDs (eg 25 images for USD 50.- , 50 images for USD 40.-) and different sizes prices for the print sizes (5x7 for USD 3.- , 8x10 for USD 5.- etc)

In the shopping basket users can delete items and modify amounts. When checking out and the user isn't logged in he gets redirected to a combined login/ registration page (registration possible even if disabled in admin cause it's necessary for the plugin to work). If the user has to register he doesn't get sent a confirmation email but gets logged in automatically. Now he needs to confirm his order and then receives an email with his bought items and payment details.


Installation:
Go to your config and enable plugins (if not already). Then open the plugin manager (from config too) and install the 'photo shop' plugin. That's it...
have a llok at photo_shop/images_to_move/css_changes.txt - that file describes the additional css the shop is using (add it to your themes style.css)
(Please read this entire text and the version changes as it describes all the new features)

Now goto config -> Custom fields for user profile
change these to the necessary fields users should enter when ordering. Address, zip, phone etc

SQL should be updated automatically. There'll be some sample config as well. In the admin menu click 'Shop'. You'll see the shop admin. It's empty cause there are no orders yet. Click 'Config' (top, right side... just below 'Shop' in admin menu). Here you set up prices and names for your items. You can sort as well here for the display in the dropdown above each picture.

You should modify the confirmation email template in the plugins lang file.
You can use placeholders
{USER_NAME}
{SITE_NAME}
{ORDER_ID}
{PRICE}
{ADMIN}

Finally move the images from the archive (folder images_to_move) to your themes images directory

Testing:
Try to add some items to your basket. Delete them, increase/ decrease amounts etc.. Just get familiar with it. As guest checkout (only possible when items are in your cart). You'll get to a combined signup/ login form. Enter a new username/ pwd etc. and submit. The user'll get automatically logged in and directed back to the checkout. Here he sees an overview of his items. If he confirms the stuff is added to the SQL and emails sent to the user and you.

Now open the shop admin again (link 'Shop' in admin menu)
You'll see the new order in an overview. Icons in front.. meaning (order) viewed, paid, (items) sent (to user). When clicking the order you'll see the detail view. Thumbs of the items etc, pid, price, amounts, cd or photo (and size). In the header user name-> link to profile, email, total price. Just have a look. You can mark the checkboxes and do certain actions (delete, mark paid/ sent, mark unpaid, unsent). If you mark all as sent or paid this'll then gets changed in the overview as well. In detail view click an item to go back to the overview. When order has been processed you can here move the order to the archive.

I've added a new version of the archive including the fixes and improvements of this thread to date 06/11/2006

New version (1.1 uploaded on 08/09/2006)
 - added shipping costs
 - added support for a tag in template.html {CART_MENU}, either add that to your template or the cart will be inserted after the sub menu
- fixed all known bugs


New version (1.2 uploaded on 10/03/2006)
 - added bridge compatibility (should work without the need to configure anything, beta status)
 - added a paypal gateway (configure and enable it in include/gateway.inc.php, beta status)
 - fixed 2 bugs related to the shipping costs addition

New version (1.3 uploaded 10/07/2006)
 - added per album settings, in the shop config you can browse through the existing albums and set different prices. These override the global configuration. Also you can disable to show the shop for a certain album (checkbox).
 - If you set in the per album settings the price for a item to 0, then it won't display anymore in the shop
 - the order admin shows now the filename too

New version (1.3.1 uploaded 10/25/2006)
-fixed: under certain circumstances only one order got shown in admin ( http://forum.coppermine-gallery.net/index.php?topic=32231.msg177562#msg177562 )
-fixed: displays now the correct total next to the tabs (xx orders on xx page(s))
-added: possibility to download a zip of all pics in an order ( http://forum.coppermine-gallery.net/index.php?topic=32231.msg177214#msg177214 )
-added: german lang file, thanks to mikyma (changed it a lil bit to use german umlauts in utf-8, if you use iso, you'll have to modify it)

New version (1.3.3 uploaded 1/17/2007)
-fixed: finally wrong calculation of totals if sum > 1000
-added: support for google checkout (this is just a theoretical implementation. Utterly untested, enable it only for testing purposes and to report back here. I'm from Europe and didn't want to sign up with google using fake info)  --- (and sorry, have forgotten to upload the version 1.3.2. That one should contain already the fix for the wrong total)

New version (1.3.4 uploaded 5/12/2007)
-added invoices (plain text) that get send to the user (and the admin) with the order confirmation (and another time the user will see what he purcheased after he ordered with the thank you message, so he can save that page). More info http://forum.coppermine-gallery.net/index.php?topic=32231.msg207871#msg207871
-added support for discounts. Default off. There's no gui where you can set the discounts. You'll have to open functions.inc.php in the plugins include dir, scroll down to the bottom and find function calculate_discount. It's pretty easy to do. I've already added there two examples. You just need to uncomment one to enable it. The two examples are:
1. 10% discount if user orders more than 10 pics for print
2. 10% discount if order volume is >= 100 USD
-added a MyOrders page. Users can view their orders (history). It's a stripped down version of the shop admin. User of course can't change or delete stuff. If the admin deletes an order, moves it to the archive or marks an order as paid/ sent, then the user will see these changes. The link can be removed in codebase.php function photoshop_user_menu
-if you use the modpack you may like that one. If enbabled, minithumbs get used

New version (1.3.5 uploaded 6/8/2007)
Download Photo Shop Plugin 1.3.5 here

- added global shipping/ shipping per item
Now you can set as usual a global shipping (in the shop admin set as type not cd or photo but shipping) and one per item. As with the discount you can easily change (in the code functions.inc.php, function calculate_shipping()) the beahaviour of the shipping calculation. Out of the box it's doing the following. Using the global shipping. If a user buys an item where you specified a different shipping than the global and it's higher than the global then the new (per item) shipping is used. You have nearly unlimited possibilities to customize that.
- fixed some bugs (total calculation, my orders function, google checkout... thanks to all users who helped to find them)
- added all user contributed languages

The pricelist reflects the per item prices if these are set.

6/9/2007 reuploaded the 1.3.5
- fixed colspan in photo_shop_config.php
- removed en echo command used for debugging
- added in photo_shop/images_to_move a txt file (css_changes.txt) that describes what additional css the shop is using (add it to your themes style.css)

6/11/2007 fixed missing user ids in admin



New (maintenance) version (1.3.6 uploaded 3/25/2008)
- Paypal: it's possible now to send a detailed item list to Paypal checkout, possible to define return URL and cancel return URL
- added a 'continue shopping' and checkout button to the cart
- new placeholders for the confirmation email sent to users ({USER_PROFILE1} - {USER_PROFILE6} , all custom user fields)
- in the shops config for the per album settings. A checkbox allows to set prices for all albums in a (sub)category
- fixed: if unlogged users weren't allowed to view the gallery, the shop hasn't had a check for that
- fixed: when refreshing sites, a copy of the current site shows on bottom
- fixed: user name and email show now in admin when bridged
- fixed: when using the modpack, minithumbs show with correct aspect in the cart
- fixed: total sum calculation
- fixed: some hardcoded language
- fixed: zip download has changed in the main app... now that reflects in the admin, too
- fixed: when using MySQL 5, it wasn't possible to change item order

Installation and upgrading to 1.3.6:
from 1.3.5:
Upload all files from the 1.3.6 archive overwriting the existing ones on your server. Keep the folder structure intact
Installation as usual (described above).

upgrading from 1.0 - 1.3.4 to 1.3.6
Upgrading: Before you upgrade uninstall the shop plugin (in the plugin manager) but opt not to 'remove the table that was used to store shop data'. Then upload the new version replacing the old one.
In the plugin manager install the shop again. Done. It's important to do so cause sql changed.
It is recommended to change your cookie name (config -> cookie settings -> cookie name). The shop config data is stored in a session/ cookie. The new per item shipping changed the config data and therefore already set cookies hold out of date info. With changing the cookie name the script saves a new cookie with up to date info.


Please always have actual backups of your database/ files!

demo of the new function available on my testbed http://stramm.st.funpic.org (version 1.3.4) (discount, if you order 10 or more items for print)

« Last Edit: December 21, 2008, 11:53:44 am by Stramm »
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Shopping cart
« Reply #1 on: June 04, 2006, 09:08:35 am »

some screenshots

1. how the (not logged in) user sees the plugin (add dropdown, checkout and shopping basket button)
2. the shopping basket

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Shopping cart
« Reply #2 on: June 04, 2006, 09:10:26 am »

3. order overview (admin)
4. displaying an order (admin)
5. the configuration of the plugin (prices, print sizes etc)

Dr Preacox

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 122
  • Is the Matrix...
    • Dynamic Creations
Re: Shopping cart
« Reply #3 on: June 04, 2006, 09:20:44 am »

Now this is a handy handy plugin! one thing which I would love is to be able to select an album / category that the image shop option is available, err what I mean is say I have my normal cats, albs, but I want to create a cat called shop and albums within that, so I only want the  "Add image to shopping basket: {FORM} " to show up within my shop cat and albums.

Does that make sense? I cant explain things well when im tired.

other than that its awesome, some people might be a little dumb trying to find the shop config, it took me a while.

Oh and one more thing, sorry to rant, but would it ever be possible to create it so you can set up a seperate pricing structure for each picture?
« Last Edit: June 04, 2006, 09:26:34 am by Dr Preacox »
Logged
My Mods:
Making Memberlist Public - VIEW
Different Way of Displaying Categories - VIEW
Coming Soon - Automated Sub Domains -MOD

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Shopping cart
« Reply #4 on: June 04, 2006, 09:24:57 am »

that would mean rewriting the entire plugin

I've forgotten to say that this is written for a client. He doesn't want to get named but agreed to publish the plugin here. Therefore the plugin exactly fits the need of one person and may not be exactly what you're looking for. In that case you of course can modify the code to your needs but it's not possible for me to give much support.

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: Shopping cart
« Reply #5 on: June 07, 2006, 12:31:22 am »

Possibly Useful Disclaimer (before more posts start to clutter this thread):

Some of the plugin threads on this board became quickly bloated with feature requests which some people (myself included) implemented, which encouraged the requests to continue.

The intent of threads on this board (like any of the contributions boards) is to merely announce the contribution and for the contributor to make updates, as they come along.

Support for any contributions should be posted on the parent board, in this case the cpg1.4 plugins board, with reference to the contribution on this board.  That way, all support requests can be easily handled in an organized way.

In general, you shouldn't ask for new features to contributions, just like you shouldn't ask for mods or themes to get converted.  You should consider what would be required for such a new feature, then ask questions if you are having trouble implementing the new feature.  But we all know that plugin coders often like to consider new uses for their plugins, so carefully thought-out feature requests, with relevant suggestions and full details, may be acceptable even if they strain the boundaries of asking for free coding.
Logged

Dr Preacox

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 122
  • Is the Matrix...
    • Dynamic Creations
Re: Shopping cart
« Reply #6 on: June 07, 2006, 08:34:29 am »

Hmm I never thought that wasn't allowed, but now I know, Im code myself one then :)

Thank you for something to work off stramm, much appreciated  :D
Logged
My Mods:
Making Memberlist Public - VIEW
Different Way of Displaying Categories - VIEW
Coming Soon - Automated Sub Domains -MOD

julala

  • Contributor
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Gender: Female
  • Posts: 55
    • Smileonthetiles
Re: Shopping cart
« Reply #7 on: June 10, 2006, 04:11:16 am »

Another great mod /plugin from Straam  ;D

One small thing.  When there is no CD option for buyers to purchase, for example you only offer photo prints - there seems to be a totals calculation error.

Screen shot:

(http://www.smileonthetiles.com/images/photo_shop_bug.jpg)

Notice that the individual price of the photo is 4.49 but the total shows 4.00.  Interestingly if I do add a CD purchase option in the config this error does not occur at all.




« Last Edit: November 26, 2008, 09:44:16 pm by julala »
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Shopping cart
« Reply #8 on: June 10, 2006, 10:08:27 am »

Thanks, I'll check that later today

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Shopping cart
« Reply #9 on: June 10, 2006, 09:07:10 pm »

open photo_shop_cart.php
on bottom find
Code: [Select]
$price[0] = $photo_price;
$price[1] = $cd_price;
photoshop_format_price($price, $counter, $error);
and replace with
Code: [Select]
$price_t[0] = $photo_price;
$price_t[1] = $cd_price;
photoshop_format_price($price_t, $counter, $error);

julala

  • Contributor
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Gender: Female
  • Posts: 55
    • Smileonthetiles
Re: Shopping cart
« Reply #10 on: June 11, 2006, 02:04:41 pm »

Great - many thanks Straam  ;D
Logged

depach

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Shopping cart
« Reply #11 on: June 12, 2006, 05:02:30 pm »

ok 5 words: you and your client rocks

This is 100% what i am looking for i am able to take it from here and integrate my CC
processor

thanks again! :)

Jared
Logged

Pascal YAP

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 13833
  • Hello World :-)
    • CPG 1.5.x ExperiMental website
Re: Shopping cart
« Reply #12 on: June 18, 2006, 12:15:06 am »

Stramm,

waouh ! Très fort !!!!
Je vais faire une traduction de ton super MOD en Français  ;D
Je vais aussi créer un nouveau sujet dans notre Forum CPG Français.

From french :
WoW ! So strong !
I will be translate your powerfull MOD in french  ;)
And a new topic in our French Board ! Is it possible ? Are you OK with me ?
[edit by PYAP]This SHOPPING CART Topic in French Board[/edit]

I found a breaking picture near line 191 and 218 in photo_shop_cart.php (themes/eagle/images/delete_small.gif) and need this images in order on the right place  ;)

  But only one Question : have you a solution to choice an other language by one click on a "radio-button" ?

TEST SHOPPING CART IN MY CPG (partially translated in french) NO ORDER ALLOWED. BUT YOU CAN TEST, FOR MY PERSONNAL FEEDBACK.
(plugin disable)


PYAP
« Last Edit: December 16, 2006, 04:40:30 pm by PYAP »
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Shopping cart
« Reply #13 on: June 18, 2006, 09:16:59 am »

of course you may translate the plugin to french  ;D and I don't see any reason why not to have a topic on the french board.

The missing image has been added and the code fixed so that the shop always grabs that delete button from the themes images dir.

The radio button thingie... I don't understand it. The shop switches its language as coppermine does. Do you want coppermine and shop be able to run different langs? Or should the radio buttons replace coppermines lang selector?

Your personal gallery looks good. Just an additonal linebreak is necessary in template.html between menu and gallery

Pascal YAP

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 13833
  • Hello World :-)
    • CPG 1.5.x ExperiMental website
Re: Shopping cart
« Reply #14 on: June 18, 2006, 11:50:10 am »

Mornin' Stramm,

Quote
Your personal gallery looks good.
Merci  ;D
Quote
The shop switches its language as coppermine does.
Really !
I do'nt see that  ???
I'd created a FRENCH.PHP file in photo_shop/lang, and do not see any change.
I need to rename my FRENCH.PHP to ENGLISH.PHP, it's not clean enought  ;)
Then, how to install an other language ?

PYAP
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Shopping cart
« Reply #15 on: June 18, 2006, 11:59:47 am »

you should use the latest version (todays contains the missing button fix and independancy of a specific theme)
the one from 11/06/2006 allows to select a different language, you do as within the regular CPG, copy the contents of plugins/photo_shop/lang/english.php to a new file french.php and start translating.

hmm, but on your gallery the lang changes for me  ... so you seem to use an actual version of the cart
0 images dans le panier :: Vérifiez votre sélection
Ajoutez cette image à votre panier :
    
Titre :   INFOS : 7 jours sur la planète
Nom de fichier :   titre1.asx
Dimensions :   580 x 435
   10 x 15 cm    Montant :    Euros2.70 Chaque


edit: the cart menu still overlays the menu in your theme. To fix that you should open codebase.php, find
Code: [Select]
$cart_menu = " and after add a <br>

Pascal YAP

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 13833
  • Hello World :-)
    • CPG 1.5.x ExperiMental website
Re: Shopping cart
« Reply #16 on: June 18, 2006, 01:39:50 pm »

Stramm,

Quote
copy the contents of plugins/photo_shop/lang/english.php to a new file french.php and start translating.
Done... since some hours.

Quote
so you seem to use an actual version of the cart.
Yes. absolutly.

Quote
hmm, but on your gallery the lang changes for me
You see my Galery in French !???!
Normal, original ENGLISH.PHP is fully translating.
Anyway, your core code work fine. The rest is only poesy !

Quote
the cart menu still overlays the menu in your theme. To fix that you should open codebase.php, find...
In my case (Hack Theme) i edited THEME.PHP with this <br \>

Thanx for all.

PYAP
« Last Edit: June 19, 2006, 11:18:09 pm by PYAP »
Logged

Pascal YAP

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 13833
  • Hello World :-)
    • CPG 1.5.x ExperiMental website
Re: Shopping cart
« Reply #17 on: June 20, 2006, 03:38:47 pm »

Hello Stramm,

I found a mystake in your icons  ???
There's an invertion between two images PAID and NON-PAID-YET
See attached img...

PYAP
Logged

Pascal YAP

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 13833
  • Hello World :-)
    • CPG 1.5.x ExperiMental website
Re: Shopping cart
« Reply #18 on: June 21, 2006, 11:20:47 am »

Stramm, All French Bodymen,

Here is a Photo_Shop plugin in FRENCH.
Read carefully (in french) before install, because you need to replace some original files by those french files.

PYAP
Download FRENCH attached ZIP below :
Logged

Pascal YAP

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 13833
  • Hello World :-)
    • CPG 1.5.x ExperiMental website
Re: Shopping cart
« Reply #19 on: June 22, 2006, 12:17:45 pm »

Mormin Stramm,

Issue !
When someone make choice on some pictures and validate this choice, in my ADMIN Shop i can not see any detail !
See below on my two screenshots.

I'm seeing very well 8 items (nombres articles : 8) but after click on, i can'nt view what sort of items they are  ??? I see only one item ! (only the lhe last one maybe)
Do you know this issue ?

Thank's

PYAP
Logged
Pages: [1] 2 3 4 5 ... 30   Go Up
 

Page created in 0.034 seconds with 20 queries.