forum.coppermine-gallery.net
Support => cpg1.4 plugins => cpg1.4.x Support => Older/other versions => cpg1.4 plugin contributions => Topic started by: Stramm 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 (http://stramm.st.funpic.org/albums/userpics/10001/photo_shop_1_3_5.zip)
- 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)
-
some screenshots
1. how the (not logged in) user sees the plugin (add dropdown, checkout and shopping basket button)
2. the shopping basket
-
3. order overview (admin)
4. displaying an order (admin)
5. the configuration of the plugin (prices, print sizes etc)
-
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?
-
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.
-
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 (http://forum.coppermine-gallery.net/index.php?board=53.0), 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.
-
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
-
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.
-
Thanks, I'll check that later today
-
open photo_shop_cart.php
on bottom find
$price[0] = $photo_price;
$price[1] = $cd_price;
photoshop_format_price($price, $counter, $error);
and replace with
$price_t[0] = $photo_price;
$price_t[1] = $cd_price;
photoshop_format_price($price_t, $counter, $error);
-
Great - many thanks Straam ;D
-
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
-
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 (http://forum.coppermine-gallery.net/index.php?topic=32809.0)[/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. (http://www.pays-dignois.com/galerie/index.php) (plugin disable)
PYAP
-
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
-
Mornin' Stramm,
Your personal gallery looks good.
Merci ;D
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
-
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
$cart_menu = "
and after add a <br>
-
Stramm,
copy the contents of plugins/photo_shop/lang/english.php to a new file french.php and start translating.
Done... since some hours.
so you seem to use an actual version of the cart.
Yes. absolutly.
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 !
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
-
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
-
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 :
-
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
-
I know about the switched icons. Will change this in the next update. Also I'm going to replace all hardcoded text so that the plugin offers full multi language support. Btw, thanks for the french translation :thumbs up:
But I have problems understanding your last problem. Do you say you're not able to see any details when a user has made an order in your shop admin? Till now I haven't had such a problem. Can you exclude a connection to your lang hacks?
I'm attaching screenshots how it looks for me on my test machines
-
Stramm,
I know about the switched icons. Will change this in the next update. Also I'm going to replace all hardcoded text so that the plugin offers full multi language support.
Thanx for all about your plugin. Thanx by advance to work on Multilanguage support. Because when i worked on translation, i saw many infos in Admin interface whos was in english. I need to replace many Words in your code? You understood that !
[/quote]
But I have problems understanding your last problem.
Do you say you're not able to see any details when a user has made an order in your shop admin?
yes it's exactly that. I no control on User's choice ???
Maybe, can i send to you a Full ADMIN account to see my issue by yourself ?
I'm attaching screenshots how it looks for me on my test machines
I do not see this one on my config. Certainly i make a mystake on my translation :-\
PYAP
-
new version online... the shop now fully supports the lang files
ahmm, edit: the switched icons have been fixed too
-
I hope i have read enough to post in a Good Way :-\
I must give a big compliment to the Photo Shop plugin, i was trilled when i saw the new Update.
After struggling with my knowledge in installing this plugin i finaly succeed in a perfectly working Copperminewith Photo shop.
Finaly i have found a small question :
If the ADMIN is looking at an order which just has been placed, it does not display the image names in the total overview list.
only the thumbs and the amount.
Is there any possibillity in showing the names of the foto's too for the admin?
Thanks alot
Keep up the Good things
I have zozo succeed in translating a Dutch language file for Photo shop plugin, i will post it within this message.
( i have looked so long for a dutch translation file for photo shop so maybe i can make somebody hapy)
-
No, in the overview the script doesn't read all entries of an order, it reads just some header file. Here the total number of pics and the price is stored. If you want to display the pic names and/ or pids in the overview you'll have to do another query
-
thx again for the script, i am going to try mod it to add shipping costs
eg:
Please select your shipping option:
(radio button) Local Shipping (South Africa) R20
(radio button) International R100
Regards
Jared
-
brilliant!
how can I change the currency to Australian dollars (AUD) ? Do I edit english.php? which sections...
great work!
-
yep, that's all in the lang file (except one USD occurance... but that's in the admin and shouldn't hurt -> photoshop_admin.php ~line 394), nevertheless you can fix it (and this will go into the next release as well)
replace
{$lang_photoshop_admin['volume']}: {$price[$k]}USD
with
{$lang_photoshop_admin['volume']}: {$price[$k]}{$lang_photoshop_admin['usd']}
with that change the currency should be fully changeable with the lang file
-
so in the lang file I change all the USD to AUD ? (all of them?)
Eg:
change:
'USD' => 'USD',
to
'AUD' => 'AUD',
and so on?
I see there are lots, eg 'usd_total' => 'USD Total',
I already changed my photoshop_admin.php to:
{$lang_photoshop_admin['volume']}: {$price[$k]}{$lang_photoshop_admin['usd']}
but should I have put:
{$lang_photoshop_admin['volume']}: {$price[$k]}{$lang_photoshop_admin['aud']}
? sorry, I'm not so good at this stuff...
-
'USD' => 'USD',
you change into
'USD' => 'AUD',
the name before the arrow is something like an identifier, the name after the arrow what is used to replace the identifier
the above replacement for the photoshop_admin.php is correct, don't change it.
and eg.
'usd_total' => 'USD Total'
needs to be
'usd_total' => 'AUD Total'
-
thanks, all working!
-
Once again you have created a plugin thats is so perfect for my site. I have installed it and everything works as described, however one slight request on how to relocate the buttons cart and checkout. See image below. The buttons shift the sub sys menu lower causing a few layout problems..I looked in photo_shop_checkout.php thought that might be the file to edit right? Help me please I love the plug-in.(http://www.shoiecast.com/stramm/cart.jpg)
Thank you for your continued support.
-
This is a matter of theming, not of this plugin. Shouldn't be discussed on this thread.
-
Sorry for the incorrect post/reply on this thread. I thought it would be better here than starting a whole new topic in the location you suggested. I know if any body knows how confusing it is to know where things go here you should know. What I mean by that is you see this all day long right? and you cant believe we cant figure it out. Well maybe we are wrong in not reading/understanding the system like you, but you also should understand that the user friendlyness use this site is or has become a complex matter right? I have read this forum over and over and have seen this complaint by you all over the place. Once again I appologize for my mistake.
Stramm if you are reading this please suggest where you would like this question, and that is where it will go.
I understand that there has to be people like yourself to maintain some sence of order here and then there people like stramm,nibbler,and a few others who actually help in getting answers out to us ( many thanks ).
-
best would be a new thread on the plugin or the themes board
edit... on the other hand this might be pretty useful for some other people too
in the plugins codebase.php find
$html = str_replace('{SUB_MENU}','{SUB_MENU} <br /> {CART_MENU}',$html);
and comment it out (with adding a double slash in front of the line // )
now open your template.html and add {CART_MENU} where you want the basket buttons to appeare.
Note: if you use more than one theme you need to modify all themes. Editing out the mentioned line will stop the pülugin from auto adding the buttons
-
What happens when you delete an order? Does the user get a message saying their order was deleted or canceled?
-
if you need to get in conmtact with a customer there's his email addy listed in the order overview and in the order. Click it and write your message.
If you want it to be more automatic... the email function is already written. You just need to add a line or two to the code and some text to the lang file
-
You just need to add a line or two to the code
Easier said than done... ;)
-
A very good plugin but I have this problem...
I've tried to make the shop work through a bridge inside joomla (this bridge; http://www.mehdiplugins.com/misc/index.htm), and it doesn't reload/show the cart amount in the button when I add to cart, it shows a blank page instead. But when I click at it to view the contents it's all there. Besides, as an guest I can checkout, when I shouldn't even though nothing happens, just a blank page again. In admin the orders are listed without customers account name and emailaddress. Everything works when I turn the bridge off, but I really want this excellent plugin to work with joomla. Coppermine works fine btw. Check my page http://www.daynight.dk/gallery/index.php. Hope someone can help.
-
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.
as already written... this was an order and my customer agreed to make this plugin available to the CPG community. The plugin hasn't been written with bridging in mind. That'll need some modifications
eg. the query
$result = cpg_db_query("SELECT s.*, u.user_name, u.user_email FROM {$CONFIG['TABLE_SHOP']} AS s LEFT JOIN {$CONFIG['TABLE_USERS']} as u ON u.user_id = s.uid WHERE aktive=".$box." AND cd=1 ORDER BY ". $sort_codes[$sort] ." LIMIT $lower_limit, $orders_per_page;");
either one needs to add that to the bridgefile(s) -> silly cause then this wouldn't be a plugin anymore
or you need to run several queries and rewrite some functionality of the plugin... whatever, every query that accesses the usertable needs to be done via the bridge. That's exactly two queries in the admin and some in registration/ logging in
I'd really appreciate if you come up with a solution
-
Alright, I understand that the plugin is programmed only for coppermine in mind and that you don't have time to support different versions of it. However I'm not a programmer so I don't know how to write the code for the bridge file (which would be joomla.inc.php file I think from Mehdi). Those query's you talking about, I've found these in your code, are they all? If they are I 'll try to ask Mehdi about it...
photo_shop_admin.php
$result = cpg_db_query("SELECT s.*, u.user_name, u.user_email FROM {$CONFIG['TABLE_SHOP']} AS s LEFT JOIN {$CONFIG['TABLE_USERS']} as u ON u.user_id = s.uid WHERE aktive=".$box." AND cd=1 ORDER BY ". $sort_codes[$sort] ." LIMIT $lower_limit, $orders_per_page;");
$result = cpg_db_query("SELECT s.*, u.user_name, u.user_email FROM {$CONFIG['TABLE_SHOP']} AS s LEFT JOIN {$CONFIG['TABLE_USERS']} as u ON u.user_id = s.uid WHERE oid=".$oid." AND cd=1 LIMIT 1;");
photo_shop_register.php
$sql = "SELECT user_id " . "FROM {$CONFIG['TABLE_USERS']} " . "WHERE user_name = '" . addslashes($user_name) . "'";
$sql = "SELECT user_id " . "FROM {$CONFIG['TABLE_USERS']} " . "WHERE user_email = '" . addslashes($email) . "'";
// Are you sure I'll need those below?
$sql = "INSERT INTO {$CONFIG['TABLE_USERS']} ".
"(user_regdate, user_active, user_actkey, user_name, user_password, user_email, user_profile1, user_profile2, user_profile3, user_profile4, user_profile5, user_profile6) ".
"VALUES (NOW(), '$active', '$act_key', '" . addslashes($user_name) . "', '" . addslashes($encpassword) . "', '" . addslashes($email) . "', '$profile1', '$profile2', '$profile3', '$profile4', '$profile5', '$profile6')";
$sql = "SELECT user_active user_active, user_email, user_name, user_password " . "FROM {$CONFIG['TABLE_USERS']} " . "WHERE user_actkey = '$act_key' " . "LIMIT 1";
$sql = "UPDATE {$CONFIG['TABLE_USERS']} " . "SET user_active = 'YES' " . "WHERE user_actkey = '$act_key' " . "LIMIT 1";
-
When I click the checkout button these warnings appear at the top of the page. How can I avoid this? (I have no idea of coding)
Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in /mnt/cr1/07/547/00000013/htdocs/coppermine/plugins/photo_shop/photo_shop_checkout.php on line 50
Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in /mnt/cr1/07/547/00000013/htdocs/coppermine/plugins/photo_shop/photo_shop_checkout.php on line 83
-
http://forum.coppermine-gallery.net/index.php?topic=33877.0
-
Thank you, "speedy" stramm ;)
-
I have integrated your plugin, which I really like.
When testing, I found that the shopping basket still contains the images after checking out. Will the shopping basket be emptied eventually ?
-
it'll empty the basket. However it sometimes happens that a cookie gets somehow 'corrupted' and the script isn't able to delete the shopping basket parts. Clearing the cookie should do the trick
-
Photo Shop updated to v1.1
-
It's me again I spent the past month to find a solution to make the plugin work with mehdi's bridge and I still haven't come up with a solution. I'm kind of desperate for some help. Could you Stramm, help me modify the bridge file you think? (Look at my previous questions).
-
you're not supposed to modify the bridge files... modify the two calls in the photo shop files I showed you
-
Alright, I thought it was the bridge files I should modify, but that doesn't change the fact that I don't know how. I really need help how to write the code for it. I would appreciate any help...
-
Hello, first of all i want to thank the folks at coppermine and specifically Stramm this shopping cart solution is perfect! I have installed this and it works great except for my lack of know how on editing the fields below. Do i have to modify the actual file in GoLive? then reupload this to the server? Does anyone have a sample code that i could look at?
Also how do i configure this to my paypal account?
Then last, i dont understand the last line "move images" what images? I have one image folder that I uploaded to test the shopping cart and it works fine, so do i move these images now?
I am new to all this programming stuff!
Next Mod is the watermarking that I would like to install, does anyone have a plugin for that?
Thank you for all your help!!
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
-
You use a texteditor to edit php files
paypal account... this is not implemented. You'll have to modify photo_shop_checkout.php and add the billing solution of cour choice. PHP knowledge is necessary to do that
images to move... as said in the install howto (first post in this thread)
Finally move the images from the archive (folder images_to_move) to your themes images directory
Watermarking... not related to the photo shop plugin.
Next time please stick to the one question per thread policy. Don't clutter this thread but start an own in the cpg1.4 plugins forum
-
Thanks for the reply.
This shopping cart cannot be made to take paypal?
Is there a shopping cart that does?
Thanks for your help, I will try not to clutter the boards
-
As said, you'll need to edit the mentioned file and send the checkout data to paypal. I have no clue about paypal shopping system etc. so you're on your own with that.
There are paypal mods on the mods/ hacks board http://forum.coppermine-gallery.net/index.php?board=73.0
-
Thank you
-
With cart is it possible to set different return link for each item. I wish to see on demand video. After payment buyer will be send to url to watch
-
possible, in config set a 'custom field for image description' eg. URL. In here you store thze url to your on demand movie
that URL you read in the checkout and redirect the user there... find and replace index.php
msg_box('', $lang_photoshop['email_sent'], $lang_continue, 'index.php');
}
However you'd need to modify more I'd say. What happens if the user adds more than one movie to the cart?
-
Shipping costs are excellent addon. I have one problem though:
- when customer removes picture from shopping cart and then adds picture in shopping cart, the already removed picture is still in the cart (amount is 0 though) and i see those removed pictures when i handle orders. Amounts and total payment amounts are right, but it's confusing.
-
Can't reproduce this problem. Please clear your cookies and retry... looks like an out of control cookie
-
Can't reproduce this problem. Please clear your cookies and retry... looks like an out of control cookie
Thanks for fast reply. It was a corrupted cookie, now it's working beautifully!
-
The cart sounds great..but... I am willing to pay to have PayPal support if that is a project you can take on. I can program but who has time! ;)
-
Wonderful stuff! Thanks a lot!
Would it b e possible to select only one or two categories for using this shop?
My idea ist to select one for high resolution pics which could ordered.
-
Wonderful stuff! Thanks a lot!
Would it b e possible to select only one or two categories for using this shop?
My idea ist to select one for high resolution pics which could ordered.
easy to do if you don't require a backend and if it's OK to block/ show albums and not categories
then find
$event = isset($_POST['event']) ? $_POST['event'] : null;
and after insert
$albums_to_show = array(1,2,3,4,5,6,10,20);
if (!in_array($pic_data['aid'], $albums_to_show)) return $pic_data;
if you want to show the shop for the albums in the albums_to_show array (edit it to your needs)
use that to block certain albums
$albums_to_block = array(1,2,3,4,5,6,10,20);
if (in_array($pic_data['aid'], $albums_to_block)) return $pic_data;
-
The cart sounds great..but... I am willing to pay to have PayPal support if that is a project you can take on. I can program but who has time! ;)
PayPal support... where should that be added?
after
Thanks for your order.
We have sent you a confirmation email!
and there a paypal button?
-
In an earlier post you said "paypal account... this is not implemented. You'll have to modify photo_shop_checkout.php and add the billing solution of cour choice. PHP knowledge is necessary to do that"
I understand that, but I want to know if you or another can be nudged to add paypal support in a way that lets the buyer click on a 'Purchase' button under the intermediate pic and take them right into the Paypal checkout screen. I only need it to support a single item purchase. But each item in coppermine may have a different price.
If this is already available as a plugin, then my bad, but I couldn't find a paypal plugin (not a mod/hack) with unique prices for every item.
Like I said I (my client) is willing to pay for someone to add this.
Thanks!
-
@daviddubree: All the contributed plugins are on the plugin contributions board. I believe this is the only shopping cart plugin contributed so far. If it is close to what you want, you should look into modifying it for your use.
If you are asking for paid support, please post on the "Looking for Freelancers" board (after reading the Sticky thread on that board). Support on all the other boards is volunteered by the supporters for free.
-
This is a shopping cart solution not targeted to PayPal. It should support adding several items to a basket and store that after checking out in the db. A backend shall help the webmaster to send the pics and see the total amounts. What you want to have is totally different and therefore this plugin is not for you. It's not difficult to add a paypal button somewhere in/ after the checkout. That would be for all items in the basket.
You should check the mods board and search for 'PayPal'. There are 2 mods I think that do what you need.
-
easy to do if you don't require a backend and if it's OK to block/ show albums and not categories
then find
$event = isset($_POST['event']) ? $_POST['event'] : null;
and after insert
$albums_to_show = array(1,2,3,4,5,6,10,20);
if (!in_array($pic_data['aid'], $albums_to_show)) return $pic_data;
if you want to show the shop for the albums in the albums_to_show array (edit it to your needs)
use that to block certain albums
$albums_to_block = array(1,2,3,4,5,6,10,20);
if (in_array($pic_data['aid'], $albums_to_block)) return $pic_data;
Thanks for your fast reply; i´ll give your solution a try and of course feedback.
We have only albums on our site, so this could the one i need!
-
Works like a charm! Thanks!
-
easy to do if you don't require a backend and if it's OK to block/ show albums and not categories
then find
$event = isset($_POST['event']) ? $_POST['event'] : null;
and after insert
$albums_to_show = array(1,2,3,4,5,6,10,20);
if (!in_array($pic_data['aid'], $albums_to_show)) return $pic_data;
if you want to show the shop for the albums in the albums_to_show array (edit it to your needs)
use that to block certain albums
$albums_to_block = array(1,2,3,4,5,6,10,20);
if (in_array($pic_data['aid'], $albums_to_block)) return $pic_data;
This was really nice feature and easy to add (codebase.php). Thanks again!
-
Announcement:
New version Photo Shop v1.2 available
-supports paypal and adds wire info after checkout (configurable in include/gateway.inc.php)
-bridge compatible
-bug fixes
-
**Nevermind** Just figured it out.. I think.. LOL
Stramm,
I uninstalled the old one, and installed the new one, and I can't find where to do shipping, or paypal info.. Help!!
http://www.alaskastudio.com
Thanks,
Travis
-
Paypal support.....Excellent!
Thanks
-
After carefull consideration I decided to add this feature request in this thread because I believe it is important to a lot of people. Also, I think the changes/addons I propose should be in- or be part of your plugin, otherwise future updating is going to be a nightmare. For me, this is an (out of control) hobby project, so my funds are limited, but I am willing to pay (some) for (some) programming. I wouldn't be surprised if we find more contributors in this forum. In sequence of importance (to me):
1) in the cart you see the (foto)filename. Please add that to the database and show this filename when reviewing/processing the order. So many pictures are alike..... This was mentioned before and you responded to it, but I cannot make it work. While we are at it - maybe aling with the album name???
2) I would like in my confirmation email to my client to be able to use more placeholders, specifically for the customer field (the ones the client fills when making a profile). Is that hard to do?
3) multiple pricing sets. This can be real simply accomplished by having an extra field at the same place where you specify the prices right now. Per line you enter an code/ID (e.g. 1, 2, A, B or A1 etc. etc.) In the albums you need just one admin option, namely this code. No code means no shop, and listing a code means showing the appropriate types that can be ordered.
4) allow for a printout per order in the active orders list
If you feel this item needs to be discussed off-forum than please email me privatly (joost@skygliders.nl). Thank you in advance for your consideration.
-
1. The filename is not unique, but the picture ID is. The cart shows exactly that ID and links to the picture in question (click the thumb)
2. Possible
3. The shop isn't made with that in mind. Not that easy to do -> currently I'd say no, If you find someone else who's willing to change the code, perfect
4. Can't you use the browsers print function?
-
Thank you for your reply.
Sub 1) you are of course correct on this one, but that's a matter of planning. A combination album and filename is also unique though. Right clicking is kind of tedious and does not work for printing or speedy processing. We need to do small order reprints for very little money and therefore automation is helpfull. Since the client cart shows filenames I was hoping to be able to forward that info.
Sub 2) ok - hopefully we will see that in an update. As stated, I am willing to contribute for you/someone to compensate for programming hours
Sub 3) no comment
Sub 4) see sub 1. It is not a very clean solution, I am used (in client/server db apllications) to make it nice, with client data and repeating headers etc. I guess I could dive into this, but my PHP experience is limited to hacking some existing code, this is a little more involved.
I will keep an eye on this board - who knows we will get some more reactions.
-
Thank you for your reply.
Sub 1) ... Right clicking is kind of tedious ...
try shift left
-
3) multiple pricing sets. This can be real simply accomplished by having an extra field at the same place where you specify the prices right now. Per line you enter an code/ID (e.g. 1, 2, A, B or A1 etc. etc.) In the albums you need just one admin option, namely this code. No code means no shop, and listing a code means showing the appropriate types that can be ordered.
I did some coding today and came up with a per album solution. In the shop config you can browse through a list of all existing albums and disable the shop for that album or you can define different prices for the items in this album.
PM me your email and I send you the plugin to test
-
I am getting confused between the 2 threads - one in the 'looking for support' forum and one here. Until I hear otherwise I will keep on posting in this thread. I placed the following in the other thread - I am repeating it here for the sake of clarity (I was wondering myself whether I had gone nuts - I knew I had posted something this afternoon).
For those following this thread: I have yet to test any new code and Stramm or I will report back later.
http://forum.coppermine-gallery.net/index.php?topic=37021.msg174382#msg174382 (http://forum.coppermine-gallery.net/index.php?topic=37021.msg174382#msg174382)
am not going to argue, you have put much more thought into this than I did. I will be happy with any additional feature over the current shop anyway.
Let me make sure I understand what you just said in the listing above:
- you agree with the switch in the albums
- in the pricing structure, there are default prices to be used if the shop switch is on and
you can specify prices that only show in a specified album - in this case the default prices (including default add to cd and default shipping) don't show
I would be perfectly happy with this.
For the sake of clarity, let me explain what my idee was, because it is not so silly as you might think (it might be more complicated and therefore not worth it...)
In the pricing setup you ad a code to every line item, like A or B or C or .... You can have 5 prices with code A, 3 with code B, and so on. In the album setup, you tell the album which code goes with the album, no code means no shop, code A means only the pricelist items with an A are shown, and so on. With just a couple of pricing sets you could serve hundreds of albums, certainly a nice feature. Specifically for commercial phototgraphers, they can have a setup for weddings, a setup for schools, one for a sporting event, a showcase album without any pictures for sale.
Maybe you got my point right away, but I just wanted to make sure.
-
Announcement:
New version Photo Shop v1.3 available
-
I was fortunate to be the first one to 'test-drive' this new version and YES, all of sudden the basic shopping cart is a much more usefull instrument. Over the past month I have checked many different solutions. Since I have used Coppermine for quite a couple of years, you tend to measure everything against this (great) package. But, even when you take an objective standpoint, one realises that the flexibility and expendibility of Coppermine is hard to match.
For the project on hand I really need some shopping capabilities and I felt I had to look around. After checking I don't know how many packages most promising looked to me the EOS (eostemplate.com) plugin for JAlbum/IMatch/IView/BreezeBrowser or PhotoStore from KTOOLS.net. The big problem with EOS (imho) is that you create the albums off-line, which means that you probably have to work from the same location all the time. It is also a bit tedious what you need to go through to adjust existing albums. Fine for occasional use. but for everyday additions/changes??? From the way I understood the concept you also need to organise another website with links to every album you create. There are some other issues as well.
KTools has a pretty nice solution, but it is completely in English and you have to go through the entire source to translate into another language. Imagine future updates.... Also, I don't like the way subalbums are handled. Lastly, I believe the layout can only be adapted so much, I looked at all the modified templates and they pretty much looked like the base template with only different background pictures and colours, but not true makeovers.
The incredible flexibility offered in Coppermine, the ease of creating add hoc categories and albums, the ease to handle either 10 or 1000 pictures, it all made me come back and trying to find a way to make this (coppermine) work for my purpose. The basic photoshop from Stramm did just not cut it for me, but version 1.3 makes the difference. For me, and I believe for many others, this will work right out of the box. At first glance there are just some minor changes, but when you think about the implications, you realize that suddenly this is a package with enormous potential.
I certainly hope there will be someday a version 1.x, but already: thumbs up for this great plugin.
THANK YOU STRAMM
-
Installed the plugin yesterday. The only thing so far I need help with is the order manager. I see that I have 8 orders but the manager is only showing one order at a time. I rearranged the order/orders to sort in a different fashion ie. order date,order id and I can see that the other orders pop up but only one at a time. The complete list of orders do not show up, but are in the system? I should mention that the version I installed is 1.3 the newest right? I did install a long time ago 1.0 and yes I did uninstall it could that have something to do with it?
-
8 orders or 8 items for that order?? Verify with a tool like phpmyadmin... open the shop table and browse it. Can you see 8 different order ids (oid)??
-
see below
-
Stramm , Here is the data from shop table.
INSERT INTO `cpg148_shop` VALUES (1, 1, 1, 1518, 0, 1, '4x6', 2.00, 1160437327, 0, 2);
INSERT INTO `cpg148_shop` VALUES (2, 1, 1, 0, 1, 1, '0', 2.00, 1160437327, 1, 2);
INSERT INTO `cpg148_shop` VALUES (3, 2, 1, 43, 0, 1, '4x6', 5.00, 1160438133, 0, 2);
INSERT INTO `cpg148_shop` VALUES (4, 2, 1, 0, 1, 1, '0', 5.00, 1160438133, 0, 2);
INSERT INTO `cpg148_shop` VALUES (5, 3, 1, 1717, 0, 1, '4x6', 5.00, 1160438514, 0, 2);
INSERT INTO `cpg148_shop` VALUES (6, 3, 1, 0, 1, 1, '0', 5.00, 1160438514, 0, 2);
INSERT INTO `cpg148_shop` VALUES (7, 4, 1, 1717, 0, 1, '4x6', 5.00, 1160438935, 0, 2);
INSERT INTO `cpg148_shop` VALUES (8, 4, 1, 0, 1, 1, '0', 5.00, 1160438935, 0, 2);
INSERT INTO `cpg148_shop` VALUES (9, 5, 1, 43, 0, 1, '4x6', 5.00, 1160440323, 0, 2);
INSERT INTO `cpg148_shop` VALUES (10, 5, 1, 0, 1, 1, '0', 5.00, 1160440323, 0, 2);
INSERT INTO `cpg148_shop` VALUES (11, 6, 1, 43, 0, 1, '4x6', 5.00, 1160440485, 0, 2);
INSERT INTO `cpg148_shop` VALUES (12, 6, 1, 0, 1, 1, '0', 5.00, 1160440485, 1, 2);
INSERT INTO `cpg148_shop` VALUES (13, 7, 245, 1518, 0, 1, '5x7', 7.00, 1160455742, 0, 2);
INSERT INTO `cpg148_shop` VALUES (14, 7, 245, 1518, 0, 1, '4x6', 5.00, 1160455742, 0, 2);
INSERT INTO `cpg148_shop` VALUES (15, 7, 245, 0, 1, 2, '0', 12.00, 1160455742, 0, 2);
INSERT INTO `cpg148_shop` VALUES (16, 8, 245, 1518, 0, 1, '5x7', 7.00, 1160455900, 0, 2);
INSERT INTO `cpg148_shop` VALUES (17, 8, 245, 1518, 0, 1, '4x6', 5.00, 1160455900, 0, 2);
INSERT INTO `cpg148_shop` VALUES (18, 8, 245, 0, 1, 2, '0', 12.00, 1160455900, 0, 2);
INSERT INTO `cpg148_shop` VALUES (19, 9, 245, 1518, 0, 1, '5x7', 7.00, 1160455905, 0, 2);
INSERT INTO `cpg148_shop` VALUES (20, 9, 245, 1518, 0, 1, '4x6', 5.00, 1160455905, 0, 2);
INSERT INTO `cpg148_shop` VALUES (21, 9, 245, 0, 1, 2, '0', 12.00, 1160455905, 1, 2);
INSERT INTO `cpg148_shop` VALUES (22, 10, 1, 43, 0, 1, '4x6', 5.00, 1160497236, 0, 2);
INSERT INTO `cpg148_shop` VALUES (23, 10, 1, 0, 1, 1, '0', 5.00, 1160497236, 1, 2);
INSERT INTO `cpg148_shop` VALUES (24, 11, 1, 1461, 0, 1, '4x6', 5.00, 1160510912, 0, 0);
INSERT INTO `cpg148_shop` VALUES (25, 11, 1, 0, 1, 1, '0', 5.00, 1160510912, 0, 0);
INSERT INTO `cpg148_shop` VALUES (26, 12, 1, 1102, 0, 1, '4x6', 5.00, 1160510948, 0, 0);
INSERT INTO `cpg148_shop` VALUES (27, 12, 1, 0, 1, 1, '0', 5.00, 1160510948, 0, 0);
INSERT INTO `cpg148_shop` VALUES (28, 13, 2, 829, 0, 1, '4x6', 5.00, 1160511048, 0, 0);
INSERT INTO `cpg148_shop` VALUES (29, 13, 2, 0, 1, 1, '0', 5.00, 1160511048, 0, 0);
as the vaules show I have deleted some and not others. My userid = 1 and my partners is 245 and a test user is 2. So cuurrently there are order id's 11,12,13 and my photo_shop_admin is stating that there is 3 which is correct but only showing one, see attached image.
I use the paypal gateway, and I have also commented out the line
$html = str_replace('{SUB_MENU}','{SUB_MENU} <br /> {CART_MENU}',$html);
in the file codebase.php. for design purposes.
And placed {CART MENU} in my template.html per your suggestion.
-
To Fovsports: just for the sake of testing, switch to another thema and see what happens. It almost looks like the orders are there but that there is not enough room to list all of them...
-
I wish I could change to another theme for testing but, when I started using coppermine a year ago I messed/modded to many things and have learned a very important lesson, never mod certain files. Now I'm stuck with one and only one theme. Thanks for the help as you can tell I really need it.
-
I restored your SQL dump on my local install. All working as expected. I see your three orders (the last ones you did with USER ID 1 and 2). My suggestion would also have been to upload the classic theme and test again. Just with uploading a folder into the themes dir you can't mess up anything. Swithcing between themes you do with adding ?theme=classic to your URL eg. mydomain.com/cpg/index.php?theme=classic
-
Hello Stramm,
great MOD!
Is it possible to use the plugin wihtout a registration? Perhaps it´s possible fill out a form with the Adress (where sent the Photos)?
Thanx!
Dirk
-
possible... but you'd have to change some code... but why??
you need the customers data... if you save it in a new table or in the cpg_user table, who cares??? If you do not like the customers to be a regular registered user then create a new group 'customers' and when they register using the shops login form they automatically get put into that group.
-
At the moment you can download the files if you´re login (i need this function). And i don´t want give shop user the possebility for the file download.
Thanx for fast answer!
Dirk
-
there's a plugin that controls file access for certain groups... have a look into it. Should be exactly what you need to fine tune permissions
-
Great idea it function. Last problem the without permisson are not able to select the picture they want buy (see the jpg). I use Full-Size Photos Access Control v1.4. Perhaps the drop down can be place otherwise.
-
It looks like the "Full-Size Photos Access Control" is at fault. I need to look at this sometime (and will post on that plugin's thread (http://forum.coppermine-gallery.net/index.php?topic=25010.0) when ready).
For now, you can fix this by putting the Shop plugin below the Access Control plugin (using the arrows on the plugin manager page). With the Access Control plugin on top, things seem to work fine.
-
Hi, thanks for a great plugin.
When I open a picture based on the result of a search, I can't add to the shopping cart. But as soon I click the URL listed in the file info section and clikc the "Add to shopping cart" from there, it works fine. Actually it works fine regardless of how I came to the picture except from searches.
Sometimes a little icon is shown between the "# images in cart" and "Checkout" button when images are added to the cart.
Have I done something wrong, and if so, can anybody point me in the right direction?
Thanks a lot. I hope I have posted the right place.
Jesper
-
search works with cookies... and therefore the URL for all searches is the same -> adding the items to the shop db won't work. Only practical solution would be to blend out the shop for searches
-
Announcement:
New version Photo Shop v1.3 available
Hi,
Where do i get this plugin? In cpg149_plugin_pack.zip I can only find the version 1.0
The cpg149_modpack_stramm_3.zip contains other stuff.
I am too silly - or it has been forgotten to state somewhere ...
Regards,
Ralf
-
attatchment in the first post of this thread
-
:-[ sometimes, it is so easy ...
Thanks!
-
Stramm,
Is there a way to streamline the paypal option a little? Maybe when the user is viewing their cart, and click on checkout, it takes them directly to paypal, and then have paypal return them to the confirrmation page. Paypal can send all of the info back to the website, via a token. If you could point me in the right direction I will see what I can work up..
Also, how hard would it be to add a different shipping amount for each item, or assign each item a weight, and then calculate the shipping.. Unfortunatly, I sell everything from postcards, to large framed pictures. Once again, maybe if you can point me in the right direction...
Kinda like mixing oscommerse with this.
Thanks,
I have attached the files I use for oscommerse for the 3 types of payment I do, and the shipping stuff.. It might help..
-
Here is the shipping script
-
you'll have to modify photo_shop_checkout.php
the checkout button ---> you'll need to send paypal not only the total and the shipping amount, but info about every item. If paypal can't return all that info ... bad luck. Then it's not possible to go this way (cause you can't add the items to the shop db). I haven't looked into this and the paypal functionality. However I decided against that solution. A lil glitch in the users internet connection and he has paid but the purchease info doesn't get back to your shop.
As it is now... he orders and gets presented a bunch of payment possibilities, pays and when payment arrives you mark the order paid and deliver.... cool, and if paypal cvan return back... then the shop can automatically mark the order paid for you (not yet implemented)
The shop doesn't save info about each item in your pictures db. So it's not possible to have shipping depending on items. Would be possible to have different shipping costs for each album. The most expensive overrides all others.
If you don't hesitate to rewrite, then you'd assign shipping to the cart items and not the items in the pictures db., if no shipping is set, then the default is taken into account
eg.
Photo books - shipping USD 10.-
Greeting cards - shipping standard
If the guy orders greeting cards... then what you've set in config rules. If he orders a photo book... then you override the standard shipping with the USD 10.-
Haven't looked into this yet, but I think it's doable without to much problems
-
One other thing that would be nice is a CAPTCHA on the checkout page. I have had spiders (i think) submitting orders. It is usually from an email address simular to test@testuser.com. I have had 3 in the the last 2 days..
I will play with the coding a little bit for the cart and see what I can break! ;D
-
Hallo
just one more question to this great plugin :D
How does the admin get the pictures to send them to a foto service ?
I think the best way is to dowload all pics like the favorites zip download.
is there such function ?
Greets Michael
-
no, not yet
-
Thanks for the fast reply
so i have to try a bit coding ;D
It can t be that difficult,
the function to write zip files already exists.
Greets Michael
-
should be pretty easy... maybe I do some coding regarding zip downloads too
-
zip download addon:
open photo_shop_admin.php and find
<span style="float:right;"><a href="mailto:{$user_email[$k]}">{$user_email[$k]}</a></span>
above add
<span style="float:right;"><a href="index.php?file=photo_shop/photo_shop_zip&oid={$oid[$k]}">{$lang_photoshop_admin['download_zip']}</a></span><br>
in photoshops lang file english.php
find
//1.3
'filename' => 'Filename',
below add
//1.4
'download_zip' => 'Download zip'
place the attached file into the photo_shop directory (unpack first)
-
Super
That s it ! Saves a lot of time :P
Thanks for solving this so fast
Greets Michael
-
Thanks for the paypal integration - thats saved alot of time :)
One small issue - having used the shop plugin with no problems for several months, I just upgraded to version 1.3 in order to have the added paypal function and now I am having a display problem in the admin page. This was highlighted by a previous poster but no solution mentioned. Only one order shows when in fact there are lots more. The orders are there but they are not showing. From the pevious response I am assuming this may be a theme problem with the plugin but I have had no problems using my current theme until now. I am wondering if the theme independace was missed in the latest version.
(http://www.smileonthetiles.com/images/photo_shop_bug_2.jpg)
Your thoughts welcome.
Thanks
Julia
-
I wasn't able to offer a solution cause I wasn't able to replicate this problem
I've imporetd the dump of the prev poster and all worked smooth for me... no problem with the themes I tried
-
Here my little "give back" for this Plugin ;)
german.php laguage file Version 0.9 Beta (photo_shop_version 1.3)
which means you should have an eye on the translation 8)
by try a bit before use produktive !
The e-mail notification text (admin and user) also have to be changed!
(line 26-30 and 38-40 of german.php)
simply copy attached file into lang folder of photo_ shop plugin,rename it to "german.php"
and make sure coppermine runs with german language.
Greets Michael
-
Thanks for your contribution, it'll be part of the next version of this plugin
-
I tried reverting to classic theme to see if the afore mentioned wobbly was restricted to my own theme and the problem remained.
Still investigating.
-
other mods/ plugins running??
can you dump your photo_shop mysql tables and attach them to your next post?
-
cpg 148
Plugins:
Onlinestats v1.2
CPG miniCMS v1.5
CPG MassImport v2.0
Photo Shop v1.3
Mods:
mod pack for 1.4.5 with bridge support (plus extra blacklisting and blocking features done by you - see post http://forum.coppermine-gallery.net/index.php?topic=31392.msg145323#msg145323 (http://forum.coppermine-gallery.net/index.php?topic=31392.msg145323#msg145323))
Nibblers category theme manager
SQL dumps:
--
-- Table structure for table `cpg_shop`
--
CREATE TABLE `cpg_shop` (
`id` int(11) NOT NULL auto_increment,
`oid` int(11) NOT NULL default '0',
`uid` int(11) NOT NULL default '0',
`pid` int(11) NOT NULL default '0',
`cd` tinyint(2) NOT NULL default '0',
`quantity` int(11) NOT NULL default '0',
`size` varchar(40) NOT NULL default '0',
`price` decimal(9,2) NOT NULL default '0.00',
`otime` int(11) NOT NULL default '0',
`status` tinyint(2) NOT NULL default '0',
`aktive` tinyint(2) NOT NULL default '0',
PRIMARY KEY (`id`,`oid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=709 ;
--
-- Table structure for table `cpg_shop_config`
--
CREATE TABLE `cpg_shop_config` (
`id` int(11) NOT NULL auto_increment,
`type` varchar(40) NOT NULL default '0',
`name` varchar(40) NOT NULL default '0',
`price` decimal(9,2) NOT NULL default '0.00',
`max_items` varchar(40) NOT NULL default '0',
`priority` int(5) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=38 ;
--
-- Table structure for table `cpg_shop_prices`
--
CREATE TABLE `cpg_shop_prices` (
`id` int(11) NOT NULL auto_increment,
`aid` int(11) NOT NULL default '0',
`gid` int(11) NOT NULL default '0',
`price` decimal(9,2) NOT NULL default '0.00',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
-
have you tried disabling all plugins except the shop? I'd need the dumps incl. data, not only the structure, for testing
-
Yes I have tried disabling the other plugins and no difference.
Weirdly the wobbly occurred almost at a random moment. I upgraded th plugin, it was fine for a day or so and then suddenly when I was moving some active orders to the archive the wobbly occurred and has remained thre ever since.
I have linked to sql dumps as they are too large to put here.
SQL dumps here as zip file (http://www.smileonthetiles.com/straam/sqldumpsforps13.zip)
[edit GauGau]Added hotlinked sql file as attachment.[/edit]
-
Okies, with your dumps I have the same probs as you. Will check into that the next days
-
Cool. Thank you v much. x
-
fixed
-
Yay! Works great again! Many thanks Straam! ;D
-
Hallo again
when use with bridge (joomla mehdi) the user e-mail and name isn't shown in admin panel.
The user id is shown correct and the e-mail notification (user and admin) is sent correctly too
Any idear ?
I took a look into the code but i don't see anything
Greets Michael
-
I've tested the shop bridged to phpbb and smf. That's bridge files that come with Coppermine. Joomla I do not use so I can't tell you much. And cause it's using a user contributed bridge file (at least I think so) it's even harder to suggest something useful.
Do you use the latest version?? If that doesn't help, then you probably need to hardcode the table names and remove the class definition. If that works neither you'll have to run two queries instead of a join
-
Ok,thank you
I'll try to do so and post results ;)
Greets Michael
-
Hallo
Now i have fixed the prob with the user name and e-mail in photo_shop_admin.php
when bridged with joomla! (Photo_shop vers.: 1.3)
This works only if the original Joomla Mysql-Tablenames are used,without prefix.
I have attached a comment at the changed codelines.
just replace photo_shop_admin.php with attached file (rename it into photo_shop_admin.php)
-
Another problem when bridget to joomla is the
reload when ad a photo to basket:
The photo wil be added but the count inside the baket button is not increased.
when adding a pic the browser doesnt return to that pic.
I think i have to change codebase.php
<form action="{$REFERER}" method="post">
{$added}{$lang_photoshop['buy']} {$html}
<input type="hidden" value="{$pic_data['pid']}" name="pid" />
<input type="hidden" value="add_item" name="event" />
<input type="submit" value="{$lang_photoshop['send']}" class="comment_button" />
</form>
or / and the
function
photo _shop_refresh
Greets Michael
-
I have installed this but now all my images show the dreaded red x?
-
@germinus
you have to copy the images in photoshop plugin folder to your themes images folder i think.
Greets
-
no, no need to copy the pics into the plugins folder.
If it something doesn't work, post a link
-
Hiya.. I probably already said this but fantastic contribution Stramm! All of your stuff is great. ANyways.. this is a quesiton about styling. The # of images in cart and checkout button are currently styled within the admin_menu a.link style. WHere can I find this in the code to put it into another div?
-
you can edit that in the function photoshop_user_menu, codebase.php
-
Photo Shop version: 1.3.1 is an awesome script, however I found two bugs, one is I can’t add an image to the shop from the search result form. And if the total sum in basket is over a 1000 it only shows 1.00 :)
Regards Sam
-
I have downloaded and installed photo shop 1.3.1
I finally enabled PayPal, but I'm most interested in the album settings to turn on/off pricing and set pricing for individual albums. I read in a previous post that this feature was added, but I can not find it my admin screen, config screen or shop screen. Should I udpate a php file first?
I am running CPG 1.4.10
www dot videocp dot org dot coppermine is the website.
Thanks in advance.
-
in the admin menu click 'shop', open now the shop config (top table header to the right side 'config'), now have a look below the main config, below the two submit buttons, there you'll see: Per Album Settings - Coppermine Photo Gallery 1.4.10 modpack v1 (stable)
select an album in the dropdown, the page reloads and you can chose new prices for that album or if the shop is visible for that album
-
Photo Shop version: 1.3.1 is an awesome script, however I found two bugs, one is I can’t add an image to the shop from the search result form. And if the total sum in basket is over a 1000 it only shows 1.00 :)
Regards Sam
first is known
second... I'll have to check
thanks
-
And if the total sum in basket is over a 1000 it only shows 1.00
confirmed, lil glitch
fix: open shop plugin dir include/functions.inc.php, find
$cd_price = number_format($temp_price[1],2);
$photo_price = number_format($temp_price[0],2);
$shipping = number_format(($SHOP_CONFIG['ship']),2);
$tot_price = number_format(($cd_price+$photo_price+$SHOP_CONFIG['ship']),2);
replace with
$tot_price = number_format(($temp_price[1]+$temp_price[0]+$SHOP_CONFIG['ship']),2);
$cd_price = number_format($temp_price[1],2);
$photo_price = number_format($temp_price[0],2);
$shipping = number_format(($SHOP_CONFIG['ship']),2);
-
in the admin menu click 'shop', open now the shop config (top table header to the right side 'config'), now have a look below the main config, below the two submit buttons, there you'll see: Per Album Settings - Coppermine Photo Gallery 1.4.10 modpack v1 (stable)
select an album in the dropdown, the page reloads and you can chose new prices for that album or if the shop is visible for that album
Thanks, I just did not look hard enough. One more thing. After I select an album and the screen refresh, I get the following error just above the Per Album Settings section
Warning: Invalid argument supplied for foreach() in 'web site'\plugins\photo_shop\photo_shop_config.php on line 201
Any thoughts? Thanks again for your support. I am really looking forward to putting this plugin to use.
-
hmm.. seems to be a cookie hickup, try clearing the cookie
-
hmm.. seems to be a cookie hickup, try clearing the cookie
I closed all browsers and deleted cookies and temp files (via control panel Internet Options icon). When I open CPG, login as admin, go to shop I get the following at the top also.
Warning: Division by zero in 'website'\plugins\photo_shop\photo_shop_admin.php on line 230
Warning: Division by zero in 'website'\plugins\photo_shop\photo_shop_admin.php on line 231
-
something's messed up...
some data in the shop table is missing. If you don't have any sensible data already (if you're just testing the shop), then empty the shop table (CPG_shop). If there's already data in it you need, then we have to look what data exactly causes the troubles
-
something's messed up...
some data in the shop table is missing. If you don't have any sensible data already (if you're just testing the shop), then empty the shop table (CPG_shop). If there's already data in it you need, then we have to look what data exactly causes the troubles
I have deleted all data in shop table and verified that temp_data, and config are empty also. I have turned off the shopping cart my albums at this time (individually). But I was getting the error for that.
Also, I would like to add a new type (DVD) to the shopping cart but can not figure it out. Perhaps this has been posted already, the thread(s) are long for me I guess.
-
can you dump your shop tables and attach them to your next post???
-
can you dump your shop tables and attach them to your next post???
Hope this helps.
-
after a quick check I see that all the data in the table prices is invalid...
empty that table and restart (but don't ask me how you succeded to do that, I have no clue at all ;) )
also set the default prices to some value > 0 like USD 5.00. That price gets displayed if you don't set an exception for a specific album.
-
after a quick check I see that all the data in the table prices is invalid...
empty that table and restart (but don't ask me how you succeded to do that, I have no clue at all ;) )
also set the default prices it to some value > 0 like USD 5.00. That price gets displayed if you don't set an exception for a specific album.
Thanks, I make the changes to the price in prices table.
Your last statement says that price will be shown if I do not set the exception for the album. Are your referring to a situation where I can select from the list of and offer only selected pricing for a picture, or will the complete list be shown for each picture?
OK, I updated the price table with 5.00 and I still have the problem. I have attached the table again for our review. Thanks again.
-
the complete list will be shown... always. If you define an exception it gets displayed in red in the admin (so you know you fiddled with it). The exception just overrides the standard.
You can disable displaying the shop for certain albums though (in the per album settings too)
-
confirmed, lil glitch
fix: open shop plugin dir include/functions.inc.php, find
$cd_price = number_format($temp_price[1],2);
$photo_price = number_format($temp_price[0],2);
$shipping = number_format(($SHOP_CONFIG['ship']),2);
$tot_price = number_format(($cd_price+$photo_price+$SHOP_CONFIG['ship']),2);
replace with
$tot_price = number_format(($temp_price[1]+$temp_price[0]+$SHOP_CONFIG['ship']),2);
$cd_price = number_format($temp_price[1],2);
$photo_price = number_format($temp_price[0],2);
$shipping = number_format(($SHOP_CONFIG['ship']),2);
Thanks Stramm, now it works perfect.
About the other problem, I discovered that final extract doesn’t work properly on the search page neither; maybe the bug is on the search page and not in your script.
Regards Sam
-
I have another styling question.... How would one go about moving the drop down price menu that defaults directly above the image? Thanks in advance.
-
Without much code changes... you can move it below the image (if that's what you want)
-
yea that is what i am looking to do
-
open codebase.php (the one in plugins/photo_shop) and find
$pic_data['html'] = $shop_data.$pic_data['html'];
replace it with
$pic_data['html'] = $pic_data['html'].$shop_data;
-
great! thanks!!
-
Novice user here, so please be gentle....
Firstly, thanks for the superb plugin.
I want to change the currency from the default USD to GBP. I assume I do this via either "photo_shop_config.php" or "photo_shop_admin.php" but each time I log onto these files through my browser, I get the error message:
"Not in Coppermine..."
Hope someone can help.
Thanks,
Mark
-
open the language file (plugins/photo_shop/lang/your_lang.php) and replace all occurances of USD with GBP
-
Thanks for the great mod, been looking forward to it.
When I install the plugin, it installs without error, but when I go to 'Shop', 'Config' it does not display any items. And when I try to 'create new item' it displays a critical error 'There was an error while processing a database query'.
Let me know what info you need from me to assist.
-
Turn debug_mode on, then post the actual error message (the query that fails, not the debug_output)
-
This is the output from the debug.
While executing query "INSERT INTO cpg1410_shop_config (priority) VALUES ('')" on 0
mySQL error: Out of range value adjusted for column 'priority' at row 1
-
http://forum.coppermine-gallery.net/index.php?topic=39212.0
-
Thanks Stramm, problem solved. ;D
-
Hi Stramm,
first I wanna say thanks for this nice plugin and thanks to the great support here on board!
Next I must come up with my first question: Would it be possible to show the photo-shop feature only to registered users? As for now any user (reg. or not) can fill up the photo-basked and order directly. Of course, if not registered, users have to register first but will get logged in anyway. What I want is the possiblity to first validate the user-registration as I do in the normal registration procedure. So best would be when users have to register first, BEFORE even seeing the photo-basked and order-buttons.
Any suggestions would make me more than happy! ;-)
Thanks in advance, Rich
-
codebase.php... after
function photoshop_add_item($pic_data){
global $CONFIG, $SHOP_CONFIG, $lang_photoshop;
$html = "";
$added = "";
$event = isset($_POST['event']) ? $_POST['event'] : null;
add
if(!USER_ID) return $pic_data;
after
function photoshop_user_menu(&$html){
global $template_sys_menu_spacer, $lang_photoshop;
add
if(!USER_ID) return $html;
the first addition won't let the shop plugin show the add item part above the intermediate image to not logged in users
the second takes care of the '# images in basket' and 'checkout' buttons
-
Hey Stramm,
i'm in a hurry, godda run now but will get back to it later. Thanks very mucho for your reply so far, I'll post my result later the day!
Rich
-
Okydoky, I did the changes in codebase.php as you mentioned and I must say: YOU ARE SO COOL! ;-))
I'm honestly impressed about the support given for a free software. Chapeau, guys!
At the end I've edited the register.php in CPM-root more than I did with the PS-codebase but I think these changes could be of interest for many users of Stramms PS-plugin as well, so I'll post them here.
If users have to register anyhow when ordering prints etc, why shouldn't they register first and THEN have the shopping option?! Anyhow I changed my register.php, giving it some more required fields to get the full name and full address of the registering user, so I'd already know where to send the stuff that they will possibly order in future. According to Sami's Post in cpg1.4.x Support (see http://forum.coppermine-gallery.net/index.php?topic=37086.msg175000#msg175000) I've added/changed the Profile-Fields 1-5 in register.php for Fullname, Street, Zip, City and Country, now required. With the modification of the codebase.php in PS-Plugin (mentioned above) I don't need two registration-forms anymore and I don't have to deal with people just clicking and adding to the photo-basked for fun without filling ie their full name and address in the registration-form before the ps-checkout. Perfect to my needs!
My configuration in admin-panel is set so users can register but get an automatic email with the activation-code. As soon as they confirm the regsitration they can log in and if they want: order somethin'! ;-)
Once it's finished my Gallery will be filled only by one user/admin, people can browse the gallery and if they want to get prints or high-res-data they can register and order (but not upload or manage anything more than their profile though). Not now, maybe in the future. I'm still working on it so I can't post a link yet but I will soon and if possible I'll try to contribute here, as far as I can.
Kind regards and thanks again,
Rich
-
Hi Stramm!! This looks like an awesome plug-in!! Thank you! I have installed your latest version and in following the directions, I do not have an "admin" under the "shop". I only have the empty order information. Do I need to re-install?
-
nope. you just haven't found the config yet ;)
click shop in the admin toolbar, then look below the 'shop' button, in the table's header below you'll see on the right side 'config' -> click
-
I have a screenshot to show you that there isnt an admin under shop. I do not know how to insert it here, can you tell me? Or would you like a link instead?
-
PM me a link and an admin account login please
-
you need to have the plugin installed
-
Ok, Yesterday when I was working with it I had it there. Unfortunately I installed some sef_url plugin to test why I could not locate the photo shop when I uploaded it from the plugin mgr. The serf thing shut down my gallery for over 5 hours while I researched a fix which included deleting all my uploads. Today when I uploaded the photo shop and the one with the paypal fix they are showing on my server but cant be found in coppermine. The sample one is in the plugin file along with the photo shops and I can view it in Copp mgr. Should I upload the with ftp?
-
The photo shop plugin needs to be in coppermine's plugin folder. Of course you use FTP to upload the files.
To disable the sef plugin it's not necessary to delete all uploads.
-
I removed them from my server, uploaded them again with ftp and they still dont show up in my plugin manager. I have spent too much time already and very much appreciate your time. I am looking for a different gallery.
-
??? help.. I am now getting a
error while processing dabatase query
when I try to view my cart. I have installed and uninstalled the plugin, and when doing so it asked if I wanted to remove the table that was used to store shop data, I said yes.
When I reinstall it says ok on all updates, however it says this is already done:
CREATE TABLE `cpg149_shop_prices` ( `id` int(11) NOT NULL auto_increment, `aid` int(11) NOT NULL default '0', `gid` int(11) NOT NULL default '0', `price` dec(9,2) NOT NULL default '0', PRIMARY KEY (`id`) ) TYPE=MyISAM AUTO_INCREMENT=1
After the reinstall the ..x.. images in cart link reappears with the 5 images in it.
How do I delete this table and start fresh? How can I clear the cart? Any ideas?
... I ran debug for more info..
error message
While executing query "SELECT * FROM cpg149_shop_prices WHERE aid=" on 0
mySQL error: 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 '' at line 1
Debug info
USER:
------------------
Array
(
[ID] => 553056f4e1724e14bbfef239a190a6d7
[am] => 1
[lang] => english
[liv] => Array
(
[0] => 32
[1] => 41
[2] => 25
[3] => 26
[4] => 31
)
[lap] => 3
)
==========================
USER DATA:
------------------
Array
(
[user_id] => 0
[user_name] => Guest
[groups] => Array
(
[0] => 3
)
[group_quota] => 0
[can_rate_pictures] => 1
[can_send_ecards] => 0
[can_post_comments] => 0
[can_upload_pictures] => 0
[can_create_albums] => 0
[pub_upl_need_approval] => 1
[priv_upl_need_approval] => 1
[upload_form_config] => 0
[num_file_upload] => 5
[num_URI_upload] => 3
[custom_user_upload] => 0
[disk_max] => 0
[disk_min] => 0
[ufc_max] => 0
[ufc_min] => 0
[has_admin_access] => 0
[group_name] => Anonymous
[can_see_all_albums] => 0
[group_id] => 3
)
==========================
Queries:
------------------
Array
(
[0] => SELECT extension, mime, content, player FROM cpg149_filetypes; (0s)
[1] => select * from cpg149_plugins order by priority asc; (0s)
[2] => delete from `zacfolk_printshop`.cpg149_sessions where time<1167421966 and remember=0; (0s)
[3] => delete from `zacfolk_printshop`.cpg149_sessions where time<1166215966; (0s)
[4] => select user_id from `zacfolk_printshop`.cpg149_sessions where session_id=md5("f37936f2c25365de4776fe77fad54ad48351297330e7e2998285dc874fdcbe43"); (0.001s)
[5] => select user_id as id, user_password as password from `zacfolk_printshop`.cpg149_users where user_id=0 (0s)
[6] => SELECT MAX(group_quota) as disk_max, MIN(group_quota) as disk_min, MAX(can_rate_pictures) as can_rate_pictures, MAX(can_send_ecards) as can_send_ecards, MAX(upload_form_config) as ufc_max, MIN(upload_form_config) as ufc_min, MAX(custom_user_upload) as custom_user_upload, MAX(num_file_upload) as num_file_upload, MAX(num_URI_upload) as num_URI_upload, MAX(can_post_comments) as can_post_comments, MAX(can_upload_pictures) as can_upload_pictures, MAX(can_create_albums) as can_create_albums, MAX(has_admin_access) as has_admin_access, MIN(pub_upl_need_approval) as pub_upl_need_approval, MIN( priv_upl_need_approval) as priv_upl_need_approval FROM cpg149_usergroups WHERE group_id in (3) (0s)
[7] => SELECT group_name FROM cpg149_usergroups WHERE group_id= 3 (0s)
[8] => update `zacfolk_printshop`.cpg149_sessions set time='1167425566' where session_id=md5('f37936f2c25365de4776fe77fad54ad48351297330e7e2998285dc874fdcbe43'); (0s)
[9] => SELECT * FROM cpg149_final_extract_config (0s)
[10] => SELECT * FROM cpg149_shop_config ORDER BY 'priority' (0s)
[11] => DELETE FROM cpg149_banned WHERE expiry < '2006-12-29 20:52:46' (0s)
[12] => SELECT * FROM cpg149_banned WHERE (ip_addr='67.40.196.59' OR ip_addr='67.40.196.59' OR user_id=0) AND brute_force=0 (0s)
[13] => SELECT aid FROM cpg149_albums WHERE visibility != '0' AND visibility !='10000' AND visibility NOT IN (3) (0s)
[14] => SELECT filepath, filename, url_prefix, filesize, pwidth, pheight, ctime, title, aid from cpg149_pictures WHERE pid='822' LIMIT 1 (0s)
[15] => SELECT * FROM cpg149_shop_prices WHERE aid= (0s)
)
==========================
GET :
------------------
Array
(
[file] => photo_shop/photo_shop_cart
)
==========================
POST :
------------------
Array
(
)
==========================
Page generated in 0.12 seconds - 16 queries in 0.001 seconds - Album set : ; Meta set: ;
Notices
/bridge/udb_base.inc.php
* Notice line 114: Undefined variable: row
/themes/zstyle/theme.php
* Notice line 86: Undefined index: album
* Notice line 87: Undefined index: pos
/include/themes.inc.php
* Notice line 791: Undefined variable: pm_link
* Notice line 2724: Undefined variable: loginFormHtml
/plugins/final_extract/include/init2.inc.php
* Warning line 30: mysql_free_result(): supplied argument is not a valid MySQL result resource
/plugins/photo_shop/codebase.php
* Notice line 185: Undefined index: cd
* Notice line 187: Undefined index: photo
/plugins/photo_shop/include/functions.inc.php
* Notice line 77: Undefined index: cd
* Notice line 79: Undefined index: photo
/include/media.functions.inc.php
* Notice line 56: Undefined index:
/include/functions.inc.php
* Warning line 1983: array_merge() [function.array-merge]: Argument #1 is not an array
* Warning line 1983: array_merge() [function.array-merge]: Argument #2 is not an array
* Notice line 1995: Undefined index:
/plugins/photo_shop/photo_shop_cart.php
* Notice line 161: Undefined index: CD
* Notice line 162: Undefined index: CD
* Notice line 165: Undefined index: aid
Thanks for any help with this.
-
try to clear your cookies
-
:-[ err.. umm.. oops.. guess you didnt need that debug info. Sorry about that and thanks Stramm.
-
Hello Stramm,
First off... Great plugin. Thank you for making it available to us.
I haven't been able to get it working though. I get the following error when I enable debugging.
While executing query "SELECT *,
user_name AS user_name,
user_email AS user_email,
user_join AS user_regdate,
'' AS user_location,
'' AS user_website,
user_id AS user_id,
AS notify,
AS avatar_url
FROM `db_e107`.e107_user WHERE user_id = '1'" on 0
mySQL error: 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 'AS notify, AS avatar_url' at line 7
I believe it has to do with the necessary custom fields that are required but unfortunately I am using an e107 bridge. Since I am using bb integration, I am unable to configure custom fields.
Can you provide any advice or solution? It would be much appreciated. I am anxious to get this plugin to work.
-
I'm afaraid I can't help you much... but I can tell you that the problem isn't the shopping cart plugin b ut the modpack. You'll need an adapted bridge file for it to work. Till now bridge files are available for smf, phpbb and punbb. Making the bridge files work together with the modpack isn't that difficult. Read more about that on the modpack support thread and the modpack forum here on this board.
-
Thank you very much Stramm. I appreciate the response. Again, it looks like a wonderful and useful plugin
I am actually using your mod pack so I will head over to your other thread and read the entire thing.
Again, thank you for the guidance.
-
Sorry about the last post but I just wrote a long post and got told that I could not post here so wanted to know that I could before i retype the whole thing.
first thanks for the great plugin Stramm.
I am experiencing an error on a specific computer. I can add pics to the cart but cannot view the cart or checkout. When i try to do that i get the 'critical error': There was an error while processing a database query
I have tried the following with no avail
Logged in and out of several users
have tried in user and admin mode
Emptied ALL Browsing history and cookies etc
rebooted many times
Uninstalled and reinstalled shopping cart optionally deleting the table data.
Uninstalled every other plugin.
I have tried using another computer on the same local LAN and everything works fine so I am not giving you a demo user since i don;t think taht the problem can be replicated eleswhere..
Any suggestions?
-
Enable debug mode in config and post the mysql error message you get (not the entire debug output) when you replicate the error.
-
Here is what i got:
There was an error while processing a database query.
While executing query "SELECT * FROM cpg1410_shop_prices WHERE aid=" on 0
mySQL error: 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 '' at line 1
File: /home/content/b/v/i/bviguides/html/Domains/Surfpic/coppermine/include/functions.inc.php - Line: 248
Under "notices" I got:
plugins/photo_shop/codebase.php
Notice line 187: Undefined index: photo
Notice line 191: Undefined index: cd
/plugins/photo_shop/include/functions.inc.php
Notice line 79: Undefined index: photo
/plugins/photo_shop/photo_shop_cart.php
Notice line 24: Undefined index: cd
Notice line 165: Undefined index: aid
/include/media.functions.inc.php
Notice line 56: Undefined index:
/include/functions.inc.php
Notice line 1995: Undefined index: url_prefix
Notice line 1995: Undefined index:
Notice line 1995: Undefined index: filepath
Notice line 1996: Undefined index: filename
Is this what you needed?
-
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.
http://www.smileonthetiles.com (http://www.smileonthetiles.com)
Test account:
username: testuser
password: test123
I have the exactly same problem here. I am running latest version of photoshop.
See attached image
I noticed that when total price is over 1000.00 this problem occurs.
-
Here is what i got:
Under "notices" I got:
Is this what you needed?
try again clearing your cookies. It's a known problem and I'll adding a check in the next version.
-
I have the exactly same problem here. I am running latest version of photoshop.
See attached image
I noticed that when total price is over 1000.00 this problem occurs.
download again version 1.3.1 and replace your existing files. This problem has been fixed. If that doesn't help.... post a link please
-
Stramm, Strange, all of a suddeen everything is fine, without deleting more cookies. Any way it's working. Thanks.
Another question: is there any way that through the admin of the shopping cart i would be able to see which member uploaded the photo? The idea is to have multiple photographers upload images then pay them a comission when the photo sells.
-
easy, in photo_shop_admin.php find
{$lang_photoshop_admin['size']}: {$size[$k]}<br />
below add
<span style="float:right;" class="smallfont">Pic owner: <a href="profile.php?uid={$row_pic['owner_id']}">{$row_pic['owner_name']}</a></span>
find
$select_columns = 'filepath, filename, url_prefix, filesize, pwidth, pheight, ctime, title';
replace with
$select_columns = 'filepath, filename, url_prefix, filesize, pwidth, pheight, ctime, title, owner_name, owner_id';
-
Thanks stramm, this is good, but can we put the info for each photographer on the main admin page for the cart? IE, the pic owner is showing if you click for the details of the order but I was hoping to get it to show where all the orders are listed. More importantly, I'd like itt to show up in the archives section too since i will be doing the accounting and commissions calculations after processing the order.
Many thanks for your great support on this. You have lots of patience I can tell. :-)
-
Maybe someone can help... I've scanned through the thread to see if i could find anyone with the same problem, if I missed it please let me know.
Anyway when ever an item is added to the cart or when changes are saved in the config section of the shop the browser doesn't redirect to the last page it was on. However I tested it using the classic theme and I don't have this problem. Are there any suggestions on where to start looking to fix this problem? I am using a custom made theme and it is possible that some code was inadvertently left out.
thanks for the help and as always great job Stramm!
-
download again version 1.3.1 and replace your existing files. This problem has been fixed. If that doesn't help.... post a link please
Done that, but i still cannot get it to work... Here is a link:
http://www.mbfoto.se/dam/
-
you're right, I had forgotten to upload the version 1.3.2... my bad, now 1.3.3 is up
-
you're right, I had forgotten to upload the version 1.3.2... my bad, now 1.3.3 is up
Thx Stramm! Now it works great. You rock!
-
Hi Stramm!
I've translated your Shopping cart plugin in italian language.
I have made some modifications for italian users and italian site use only.
(I've modified a language file only)
USD ---> Euro
account ---> numero carta (card number)
routing ---> scadenza carta gg.mm.aa. (expiration date dd.mm.yy)
swifth ---> codice di controllo (check code - last 3 numbers in the back side of card)
like in italian system card payment.
Per gli utenti Italiani (for Italian users): le modifiche che ho apportato riguardano esclusivamente la valuta e i dati da inserire per effettuare la transazione con carta di credito. Vengono qui utilizzati i dati standard del nostro paese al posto di quelli internazionali come previsto nel MOD di Stramm
****************************************************************************************
Last added: italian language for international site (not italian site) use
-
Thanks, I've added your lang file to my archive. It'll be included in the next update (photo shop ver. > 1.3.3)
-
Many thanks Stramm!
-
Can I change all references from "CD" to "Other". This would, I think, allow me to offer picture packages containing different photos (rather than duplicates as can be done through the price list) or CD's - only the description would need to be changed.
i.e. CD - 25 photographs
Package 1 - (3) 4x6s of different photos
In which files would I change the references, if this would work?
Thanks
-
Should be enough to change that in the lang file. If it's still named 'CD' in the admin shouldn't matter at all (as long as the user won't see it).
so just find everything containing CD in the shop's lang file(s) plugins/photo_shop/lang/yourlang.php and modify it to your needs, eg.
change
'CD' => 'Add to CD',
to
'CD' => 'Add to other',
-
Thanks Stramm. I am still testing the plugin but will implement your suggestion when I can.
However, a strange problem is occurring when I try ordering prints as either a user or admin, but only with one or two of my image files.
In my test album (weddings), I choose the first image in the album, pick the 4x6 size print, click add then move on to the next print and do the same for the first four prints...always choosing the 4x6 print size. When I click on either the images in cart or checkout buttons, the first file displays with more than one print ordered. Some of the other files do not show up.
Yesterday,I deleted my original install of CPG 1.4.10 and the plugin Photo_Shop ver 1.3.3 and the image files. I also removed the database. Also cleared all cookies.
Today, I did a fresh install of CPG 1.4.10 and Photo_shop plugin. I am using the classic theme. I have only made modifications within Coppermine itself (site name, preferences, etc. - no changes in any files) and the Plugin (set up pricing for the prints). I copied Images from the archive to the Classic themes Images directory. Everything seems to be working except I can reproduce the same issue with the 4x6 prints. It also occurs when choosing the 5x7 prints and the 8x10 prints.
This only seems to happen with the first two prints in the gallery. I have deleted them and reinstalled them but get the same issue.
The installation of CPG with the plugin is at: www.shayphoto.ca/cpg1410
Any thoughts??
-
Hi Stramm,
Thanks for the plugin it works a treat!
Would it be possible to add a couple of buttons to the page where you "confirm your order". This would be to add extra shipping costs to the order.
For example (I'm in the UK) so postage to the UK is auto added, but if the client is in europe they could click to add that extra shipping, or if they where international they click another button to add that particular shipping cost.
Thanks in advance.:)
-
However, a strange problem is occurring when I try ordering prints as either a user or admin, but only with one or two of my image files.
Indeed, really weird. I tried to replicate it on my loacl install with no success. But I've seen what you mean. The third pic in the mentioned album gets added to pic_id 1 if another pic is already in the cart. And that if the sort order is by filename. By date it acted normal.
Without the possibility to test a few things I only can guess. Find in codebase.php (in photo_shop plugin directory)
else if(photoshop_deep_in_array($value, $value2, $item)) return true;
and comment that line out
//else if(photoshop_deep_in_array($value, $value2, $item)) return true;
please tell me if that helped
-
Stramm
Have commented out the line as you suggested. Does not seem to help - same issue.
I have left the line commented out if you have time to give it a try.
Unfortunately I am totally unfamiliar with any type of coding so can't be of much help. If there is a way to let you test out a few things, let me know.
Thanks for your time.
-
Stramm
I have uploaded a second album for testing. It does not appear to have the same issue as the one in weddings.
Thanks
P.S. I'll leave everything alone (codebase.php has line commented out as suggested) until you have a look.
-
I've tried adding 3 different levels of shipping cost for each of "Inland Uk", "European" and "International", with the intention of putting a dropdown shipping choice t the cart.
At the moment, when ordering a photo the mod picks the highest postage (or the last on the config list) and adds that and I cant seem to add the dropdown to the cart area so that clients can order which shipping they want before confirming. I'm assuming I need to add $shop_data to the checkout php but so far I'm having no luck.
Any help?
-
Stramm
I have uploaded a second album for testing. It does not appear to have the same issue as the one in weddings.
Thanks
P.S. I'll leave everything alone (codebase.php has line commented out as suggested) until you have a look.
No luck for me to reproduce that behaviour. Maybe you can make a db dump and send it to me??
-
I've tried adding 3 different levels of shipping cost for each of "Inland Uk", "European" and "International", with the intention of putting a dropdown shipping choice t the cart.
At the moment, when ordering a photo the mod picks the highest postage (or the last on the config list) and adds that and I cant seem to add the dropdown to the cart area so that clients can order which shipping they want before confirming. I'm assuming I need to add $shop_data to the checkout php but so far I'm having no luck.
Any help?
Yup, no support for different shipping levels so far. Simple solution would be to use paypal for that. Means you have to edit the paypal buy now button form. And not add the shopping cart shipping but your dropdown
-
Thanks Stramm for the reply, have you any plans to add a shipping choice to future versions of this plugin? As far as I can see, its the only thing missing from a great mod. And if its going to be added to a future release I will just wait for it and put my site temporarily on hold.
Thanks again!
-
I don't know... I'm pretty busy atm (offline) and therefore didn't do much programming lately. I know that another shipping solution would be smooth. Unfortunately it wasn't planned from the beginning. With all the new gimmicks added it'll be best to rewrite the plugin
-
Stramm, I'm going to have a play at creating a new dropdown with shipping options, see if I can somehow do this by c+p'ing your code, I've had success doing this in the past as I'm not a php writer.
To limit my search for the code I'll need can you let me know which of the php files I'll need to look through, so that I dont start looking in the wrong files.
Again, thanks a lot for the help and plugin
-
Not really sure what you're looking for...
the paypal code is in photo_shop_checkout.php
basically that's all you need. Just replace
<input type="hidden" name="shipping" value="{$shipping_price}">
with something like
<select name="shipping">
<option value="4.00">GB</option>
<option value="8.00">Europe</option>
<option value="13.50">World</option>
</select>
-
Stramm....Superb!! I owe you a beer.;)
-
No luck for me to reproduce that behaviour. Maybe you can make a db dump and send it to me??
Went to make a db dump for you this AM and the database is missing - it no loner seems to exists. I'm waiting to hear from my ISP. Perhaps it was corrupted from its inception.
Anyway, will set up another database and if the same issue occurs I'll let you know,make a db dump, and send it to you.
Thanks again for your time. Your cart is perfect for my purposes.
-
I can not see "# of items in cart" or "checkout" buttons after adding photos to my cart. My only theory is that I am not displaying a sys_menu in my customized theme and the buttons are placed in the menu or in relation to it. Could that be the issue, if so how can I move the location of these two buttons.
Thanks!!!
-
if you're not using the sub menu, then a feature since version 1.1 may be from use for you (from the 1st post of this thread:)
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
-
Stramm,
got it set up perfectly now! Thanks so much for the great plug-in, and all your help.
-
Hi
Is it possible to add placeholders so you can include a copy of the order in the confirmation mail sent to the customer?
-
same as above... needs to be coded. Not difficult but more work than the last modification
-
No luck for me to reproduce that behaviour. Maybe you can make a db dump and send it to me??
Stramm
Attached is a dump of a database (in .txt format) exhibiting the same problem. (The db is no longer installed.)
I thought I had posted a reply yesterday indicating it may be the order in which the new install of Coppermine and Photo_shop occurred however it is not.
I have installed at least five clean installs and all have the same problem with the first few files uploaded. I also tried different photos in case those files may have been corrupted.
Thanks again for your time.
-
same as above... needs to be coded. Not difficult but more work than the last modification
Ok... could you just point me in the right direction?... Please ;D
-
ahh.. sorry, that was in a different thread. I got confused :)
http://forum.coppermine-gallery.net/index.php?topic=40728.0
-
Hi Stramm,
thanks for this great plugin.
It works realy fine, but I have a problem, when I try too download as ZIP an order in the Shopping cart Admin area.
I got an error message, that the ZIP archive is corrupt. The same problem occures when I try to download 'my favorites'.
Here a screenshot:
(http://www.volleyball.lu/fotogallery/albums/userpics/10001/normal_zip_PB.jpg)
Gallery is under:
http://www.volleyball.lu/fotogallery/
Server config:
zlib
ZLib Support enabled
Compiled Version 1.2.2
Linked Version 1.2.2
Directive Local Value Master Value
zlib.output_compression Off Off
zlib.output_compression_level -1 -1
zlib.output_handler no value no value
Best regards,
Francis
-
that 'problem' not related to the plugin cause it uses the coppermine zip class. That's what you recognized too, fav download doesn't work as well.
Reason for that usually is no enough (php) memory. Default is 8mb. If you have more pics, php can't hold them in mem and zip them. Result is a damaged zip file.
-
that 'problem' not related to the plugin cause it uses the coppermine zip class. That's what you recognized too, fav download doesn't work as well.
Reason for that usually is no enough (php) memory. Default is 8mb. If you have more pics, php can't hold them in mem and zip them. Result is a damaged zip file.
Hi Stramm,
Thanks for the reply. I found the problem. It wasn't a coppermine, or Shop problem. It was a ZIP included Windows XP SP2 problem. I installed now the WinRAR programme and from this time on it works perfect.
Regards
-
Hi,
How can I put the shopping select box on the thumbnails page?
I'd rather have it over there so visitors can easily click several photo's at the same time.
Anyone?
Regards,
Foxxx
-
that's not how it works -> you'll have to code that if you want to have this feature
-
Ok,
Thanks for your answer. I'm not much of a coder myself. If you can give me a nice price, I'am willing to pay for it
Regards,
Foxxx
-
Hi Stramm,
I posted a question about the shop select box and button on the thumbnails page. You aswered that this only can be done by recoding. I was wondering if you can do this for me if it's not to much work. The select box on the imagepage can stay, this is in addition on that page.
I hope you can (and are aible to) help me, I looked into the source and I find it to difficult.
Regards,
foxxx
-
Hi All and cart man stramma.
I am using paypal on my website. On the photo_shop_checkout page. I want to remove the continue button down the bottom so it will not confuse the user on where to click
See example here
-
Hi All and cart man stramma.
I am using paypal on my website. On the photo_shop_checkout page. I want to remove the continue button down the bottom so it will not confuse the user on where to click
See example here
in photo_shop_checkout.php find
msg_box('', $msg_box_txt, $lang_continue, 'index.php');
and comment it out
-
Hi Stramm,
I posted a question about the shop select box and button on the thumbnails page. You aswered that this only can be done by recoding. I was wondering if you can do this for me if it's not to much work. The select box on the imagepage can stay, this is in addition on that page.
I hope you can (and are aible to) help me, I looked into the source and I find it to difficult.
Regards,
foxxx
I'm pretty busy atm (offline) and that's why I'm at the computer only a few mins each day. That's just enough to answer some questions here but for sure not enough to do bigger modifications or new stuff
-
Hi Stramm
Yep i thought that was was i needed to comment out , tried this yesterday and all you get is the checkout page and nothing else. ?? There are 2 lines with this code i tried commenting out both of them individual.
any other options.
Thanks
Pete
-
in the file mentioned it's only once... but shame upon my head, don't comment it out just change it to
msg_box('', $msg_box_txt, '', 'index.php');
-
Very Nice
Thanks stramm worked a treat.!!!
-
Stramm
Firstly let me say that the plugin is excellent and extremely easy to install. I went from having no install of CPG to a fully operational cart with paypal integration in about 15 minutes. Thanks!
While testing everything out, I've found one small buggette (possibly - it may be my misunderstanding of the system!) - I've had a look on the board and can't find any other reference to it so apologies if it's been posted before.
On the admin screen and order view, the volume is shown as the sum of the unit costs of the photos added to the order rather than the order total - I think this may be because of a small error in photo_shop_checkout.php:
$picture_total = ($picture_total+$price);
might be supposed to be:
$picture_total = ($picture_total+$price*$amount);
which would then store the order total in the table. However, while I've tried this and it seems to work fine I don't know if it will affect other functions in the plugin which I haven't explored, so probably best to wait for Stramm before changing this :) - elsewhere the order total is shown correctly, most importantly in the checkout itself; indeed everyone who has used the system has paid the correct amount!
-
yep, you found a lil glitch. Reason is a newly introduced feature (prices settable per album).
You're close with your fix :) but you'd have problems with the cd feature (when adding pics to a cd)
this bug only shows to the admin when he's viewing the order overview. No user will see wrong prices
move the line you edited above the bracket and all's smooth
}
$picture_total = ($picture_total+$price);
should be
$picture_total = ($picture_total+$price*$amount);
}
the main reason for that way to add the total to the db was to avoid extensive mysql queries when showing the overview. I thought the total is an important detail and should be shown.
-
Hi all,
Before i continue, let me thanks Stramm for this nice plugin. (that's done ;D)
I have two question, is there a solution to automatically resize a picture in the good size of the user choice? I mean if someone buy the same picture in 4x6 or 8x10, did i have to resize it manually before i send it to him ?
My second question, is there a solution to automatically send the zip file made bye the checkout to the email of the consumer when paypal receive the payment ?
Thanks for all the response :)
-
The purpose of that plugin is somehow different to what you expect.
Users add pics to the cart, order. You print these pics (or a printing service will do that for you) and you'll send the printed photos to your customer. So there's no need to resize pics. That's the print resolution. Instead of sending photos the user can order the pics on CD.
To make it easier for the webmaster he can download the ordered pics as zip and send the included pics to the printing service (or print them himself) without the need to search for these pics.
To automate the paypal order would mean to implement the paypal talkback feature. It's not 100% cheatprof. So I hesitate to add that as a feature. Webmasters won't check the orders anymore and rely on the system. With some spoofing however some user could order and fake the Paypal answer (that he's paid).
Search the board. I've told some other guy the basics of the paypal talkback.
-
Ok thanks for the response,
So one thing else, when you chose the same picture twice in different 'size' how can we have the information on witch size the customer needs?
I do it for a picture and in the zip file there are the same file twice ? could it be possible to show the information of the order some where?
It's only a question not a request for feature :)
-
That info is in the shop admin
-
:-[ Sorry i don't see that i can click on an order to have the detail, thanks a lot :-*
-
Hi Stramm :)
Thank's a lot for sharing your plugin.
I can't imagine the hard job it was, to make it.
However, i have some questions about the plugin :
- It seems that, in the orders window, the signs and indicators for "paid / shipped" and "Unpaid / Unshipped" are inverted. I saw the "unpaid" icon and the "paid / shipped" indication together. I think that's not a big problem for someone who knows php and programming, but for me (who doesn't know that), it's very hard to find the source of the problem.
- In the Photo_shop_cart.php file, I removed the line <tr><td>{$lang_photoshop['size']}</td><td>{$row['pwidth']} x {$row['pheight']}</td></tr> because in the cart window, the dimensions indicated were those of the image uploaded int the cpg album (and not the original size), so it was strange to see a 750x500px photo to be ordered in 30x45 cm wide. It took me at least 2 hours to find the "problem", but i'm happy to have solved it ;D
- Is it easily possible (i don't think so but....) to have more than 3 "categories" of products ("photos", "CD", and "Shipping") ?
Think i'll stop for now ;)
And last, excuse my poor english :)
-
1. it displays correctly
2. on purpose... the uploaded file dimensions don't matter for the print resolution. That's what the user orders
3. you're right
-
Stramm, I've thought of yet ANOTHER reason why the further integration of paypal would be a good idea.
Imagine people wanting to buy a picture they like.
If they aren't registered on the site they first have to register.
After that, they have to pay.
If they haven't got a paypal account they'll either have to register a new one (entering all their details again) or use a credit card.
Either way they'll have to choose a delivery address.
If this delivery address is emailed to the webmaster/shop owner then surely it isn't necessary for them to register.
Additional:
If someone accidentally closes their browser before paying, there is no link to payment anymore.
Could the return address from a successful paypal payment take you to a page that empties the "cart" from your cookies, rather than the cart being empited as soon as you press "confirm order". This would be more helpful to customers AND webmasters as it would mean that all orders that go in the database have already been paid for (theoretically - although you mentioned above that someone could fake a cookie, the webmaster would not have been emailed from paypal).
I apologise if my post contains too many suggestions/ideas. I thought it best to type them out before I forgot them
-
I forgot to mention, Stramm.
I have succesfully implemented a multiple packaging type alteration to this plugin.
Would you like me to tidy it up and send you a copy?
-
Hi,
Great plug-in... but having problems with clearing the cart.
Basically, I have no items in the cart yet it says I have 6 items. I have deleted then reloaded the plug-in and still teh same.
I have deleted cookies... and still the same.
I have deleted the database and re-created ... and still the same...
What am I doing wrong???
Only have this issue on my Dev PC... so must be a session or cookie issue???
When I click the cart I get this error:
While executing query "SELECT * FROM cpg1410_shop_prices WHERE aid=" on 0
mySQL error: 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 '' at line 1
Cheers
KB
-
I forgot to mention, Stramm.
I have succesfully implemented a multiple packaging type alteration to this plugin.
Would you like me to tidy it up and send you a copy?
If you'd post your modifiacations here ... that would be awesome
your thoughts about paypal integration:
- with the current shop layout people necessarily have to register no matter what. The person ordering this shop wanted to print and send photos to his customers. So he's in need of the address. The shop admin makes use of the customer details. Without that no uid, customer user/ nick name, nothing you could use to connect an order to
- you could modify your email (language file) and include a 'paypal pay now button' -> something like 'if you haven't paid yet yadda yadda you can use paypal yadda'
As already mentioned... I don't consider the payapl talkback feature to be failsafe/ cheatproof. So I'm not going to implement it. For some 'advanced' webmasters it may be a great feature. Still others might come here and complain when they become a victim of some cheater.
-
Hi,
Great plug-in... but having problems with clearing the cart.
Basically, I have no items in the cart yet it says I have 6 items. I have deleted then reloaded the plug-in and still teh same.
I have deleted cookies... and still the same.
I have deleted the database and re-created ... and still the same...
What am I doing wrong???
Only have this issue on my Dev PC... so must be a session or cookie issue???
When I click the cart I get this error:
While executing query "SELECT * FROM cpg1410_shop_prices WHERE aid=" on 0
mySQL error: 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 '' at line 1
Cheers
KB
Try again clearing cookies. That's usually the problem (eg when someone has a certain pic in his cart that got deleted in coppermine later on -> MySQL error -> an avoidable error message that I'll take care of the next weeks)
-
1. it displays correctly
Hem....
Excuse me Stramm but... I don't drink every day ;D
(http://www.pbase.com/ritchie63/image/74640408.jpg)
If i knew how to "repare" that, i wouldn't come to ask the question... :-[
-
Tu modifies l'inversion de la traduction dans le fichier french.php. Si c'est la question.
-
Try again clearing cookies. That's usually the problem (eg when someone has a certain pic in his cart that got deleted in coppermine later on -> MySQL error -> an avoidable error message that I'll take care of the next weeks)
Cheers... it seems a bit hit or miss, would be great to have a cleaner method.
I notice on the logout.php script it has cookie killing commented out... should it be??? (latest build)
-
Ok some how I missed it but how do I make paypal work. I have no clue about how to code or any of that stuff. So tal kto me like your telling a kid what to do. I am worst then a kid I am old and this is all new to me. Thanks
-
Stramm! Thank you so much not only for all the time and effort you put into this plugin, but also for keeping up with all the support and new feature requests found in this topic.
I was a bit lukewarm on Coppermine to start, but your plugin turned it into EXACTLY what I was looking for.
As a very small token of my appreciation, let me at least take one reply off your hands...
dnsphoto- - I just turned on PayPal for a site I am building. Here is how to proceed:
1. Navigate to: /plugins/photo_shop/include/
2. Open the file: gateway.inc.php
3. Go down about 33 lines or so until you get to this line: //2. Add PayPal button
4. Go down a couple more lines.
5. Change this: $CONFIG['photo_shop_paypal_enable'] = '0';
6. To this: $CONFIG['photo_shop_paypal_enable'] = '1';
7. If you are in the US, you can skip the next few lines, otherwise read the fine comments.
8. Finally, change this: $CONFIG['photo_shop_paypal_email'] = '';
9. To this: $CONFIG['photo_shop_paypal_email'] = 'you@aol.com';
10. you@aol.com should really be your PayPal account email, of course.
11. Save that file and load up your page again. All good!
-
Stramm. I'm seeing a problem in the cart between logged in users and non logged in users. If you are logged in the shopping cart works fine. If not, then it just shows up in plain text like this:
Add image to shopping basket: 4x6 File - USD30.008x10 File - USD40.00Add to CD
There is no drop down or "add" button.
Where do you think the error lies? Thanks in advance.
-
Works for me - and I think for most others too. So a link would be helpful
-
Sorry, here it is: http://www.surfpic.net/gallery/displayimage.php?album=random&cat=0&pos=-34
-
If you are logged in the shopping cart works fine. If not, then it just shows up in plain text like this:
Add image to shopping basket: 4x6 File - USD30.008x10 File - USD40.00Add to CD
There is no drop down or "add" button.
Where do you think the error lies? Thanks in advance.
Hi colin,
I have had the same problem. The only thing I made, I changed the plugin order.
Here a list (order) of my plugins, with this order it works fine:
1. Full-Size Photos Access Control v1.4
2. Photo Shop v1.3.3
3. Onlinestats v1.7
.....
I hope it will help.
here my old post reply 70 -> http://forum.coppermine-gallery.net/index.php?topic=25010.msg194140#msg194140
Regards
-
That did the trick. many thanks.
-
I have a little issue. Everything works great up until i get to confirm my order. When i click on "confirm your order" it will sit for a bit then bring me to a blank page with nothing on it. So the user doesn't think anything happened but......
If i log in as admin i can see the order that i just placed but i was wondering if any one had any suggestions for me.
-
link?
-
link?
Here's the link
http://www.paraphoto.com/usergallery/
Thanks
-
please enable something that allows to test emailing (like ecards)
-
Done....it doesn't send emails as well.
-
Then that's probably your problem. Get emailing going and the checkout works as well (sends an email to the user and the admin)
That's the right board to ask your question
http://forum.coppermine-gallery.net/index.php?board=52.0
-
Hello,
ive installed the shopping cart to my gallery, and its going great!
I have one question, relating to permissions. Is it possible to allow non admin accounts to access the "shop" menu item.
I want to be able to allow the effective shopkeeper to have access to this, without having access to the whole admin/config etc etc!!???
Many thanks
Dave
-
there's no nifty config setting for that, but if you edit photo_shop_admin.php you can achieve what you're up to. You need to know the user id of the user you'd like to have access to the shop admin. To find out view the memberlist and click the users nickname. In your browsers address bar you'll see the user id right after uid=
Then find
if (!(GALLERY_ADMIN_MODE)) cpg_die(ERROR, $lang_errors['access_denied'], __FILE__, __LINE__);
replace with
if (!(GALLERY_ADMIN_MODE || (USER_ID == 'xxx' ))) cpg_die(ERROR, $lang_errors['access_denied'], __FILE__, __LINE__);
and now replace the above xxx with the users id (eg. 3)
to add more users to the allowed list, extend the if clause with more conditions eg.
if (!(GALLERY_ADMIN_MODE || (USER_ID == '2' ) || (USER_ID == '5' ))) cpg_die(ERROR, $lang_errors['access_denied'], __FILE__, __LINE__);
-
Hi again.. I have been tweaking this as explained in this post but it is mixing things up.
I wanted to move my shopping cart buttons out of the admin menu and did so as you explained here:
in the plugins codebase.php find
Code:
$html = str_replace('{SUB_MENU}','{SUB_MENU} <br /> {CART_MENU}',$html);
and comment it out (with adding a double slash in front of the line // )
now open your template.html and add {CART_MENU} where you want the basket buttons to appeare
I also wanted to have them gone if you are not logged in as you explained here:
http://forum.coppermine-gallery.net/index.php?topic=32231.msg186532#msg186532
However with both of these applied it now just shows the code {CART_MENU} when you are not logged in. Can you show me the fix please?
-
Aha, thanks for that quick response. that all worked well.
I am wondering if there is a way to enable discounts to be applied, if an order for multiple images is made for example!!?
-
Hi again.. I have been tweaking this as explained in this post but it is mixing things up.
I wanted to move my shopping cart buttons out of the admin menu and did so as you explained here:
I also wanted to have them gone if you are not logged in as you explained here:
http://forum.coppermine-gallery.net/index.php?topic=32231.msg186532#msg186532
However with both of these applied it now just shows the code {CART_MENU} when you are not logged in. Can you show me the fix please?
You do not need to comment out anything... Since ver 1.1 the script detects by itself if you added the placeholer to your template. If not, it's attaching the cart menu right after the sub menu
so following the instructions in the link you posted is enough
http://forum.coppermine-gallery.net/index.php?topic=32231.msg186532#msg186532
-
Aha, thanks for that quick response. that all worked well.
I am wondering if there is a way to enable discounts to be applied, if an order for multiple images is made for example!!?
of course possible, but you'd need to code it
-
Hello!!
I have a silly question, i have the shopping cart plugin workin - thanks very much. All i would like to do is make the following change. On the order page that details a specific order, the file name is located on the right, i would like t position it under the other attributes on the left. I know this is silly thing to ask..or maybe this should be posted on a theme related board??
Many thanks
-
Hi! Stramm,
Thanks for your effor in creating this shopping cart.
I have a strange behavior with the plugin enabled.
I always add new pictures to my albums wiht the "batch add files" option on Coppermine, but when the plugin is enabled coopermine can´t add new photo files to database.
When you click on Batch add files and select the proper photo directory, coopermine normally show the filename at left side of page and a picture thumbnail on right side of page.
With plugin enabled Coopermine only show the filename on left side but never the thumbnail, of course coopermine never end loading the page.
Once disabled plugin coopermine back to normal operations.
Sorry for my bad english.
Regards
Julio Abundis
--------------
www.espaciosocial.com
-
Hi Stramm,
As with all your work its great!
I have a minor tweak that i cant work ou ton my own, please could you help.
I read all the posts here and searched too, no luck so far.
If the user adds multiple copies (lets say 3) of the same photo at the same size, everything is fine for the user in terms of checkout, but in admin i get the order, and the pricing total only accounts for one image unless i open up ht eorder. This means i get some very strange totals for pricing. The emails have the correct pricing, its just in the backend which is wrong.
Heard of this before?
http://www.buxtonphotographic.com/studio/ (http://www.buxtonphotographic.com/studio/)
sample gallery password= beer
If you need admin rights please let me know and i'll pm them
Thanks,
Simon
-
do you use the latest version of the shop(1.3.3)?
-
HI Stramm,
Sorry about that, i was on 1.3.1, i will update now.
Also, is it possible to have a review of their order in the email sent to customers? Or allow them to check their pending orders when logged in?
Thanks,
Simon
-
possible is (nearly) everything... there needs just to be someone who does the programming
however the pending orders thingie sounds interesting. When the order is marked 'sent' by the admin, the customer won't see the 'pending order' anymore. But then there needs to be a new menu link like 'My Orders', and there needs to be a possibility to disable it -> getting more and more extensive.
-
hehe,
I agree it's possible, i'll have a go at it this weekend with my limited php knowledge.
-
A reply to this thread has been split and then moved to Deutsch (German) (http://forum.coppermine-gallery.net/index.php?board=67).
http://forum.coppermine-gallery.net/index.php?topic=42747.0 (http://forum.coppermine-gallery.net/index.php?topic=42747.0)
Don't clutter this thread (or any other thread on the regular, non-language-specific boards) with postings in any other language than English.
-
Hi. Nice plugin. I do have a problem though and I can't find a reference to it in the posts. I am trying to test the plugin with real-world usage and when I add an item to the cart it works fine. And if I go to the check out it appears fine as well. The problem seems to come in when I add an item to the cart and then click on the cart button to verify the item is there. If I click the 'back' icon in the browser to go back to the photo and continue browsing the photo album (i.e. 'continue shopping' as other e-commerce systems would have) I get the number of items in the cart incremented by one. When I check the cart, the quantity of photos for the photo I returned to is 2 or 3 ... depending on how many times I check and return.
I'm using photo_shop 1.3.3, no other plugins, Firefox 2 and Coppermine 1.4.10
Thanks for any help you can give me
-
I could replicate your issues with firefox. However firefox tells you the reason in a popup box for that and requires you to click OK (resend post data). Alternatively you could click cancel. IE 7 works pretty fine for me.
To change that, you'll need to send the user to another target after adding an item -> change the refresh URL to the basket. I didn't consider this to be the most practicable way and decided for a refresh back to the image page.
Here's how to do this...
in codebase.php find
$referer = ($_SERVER['PHP_SELF'] . (isset($_SERVER['QUERY_STRING']) && $_SERVER['QUERY_STRING'] ? '?' . $_SERVER['QUERY_STRING'] : ''));
and replace with
$referer = "index.php?file=photo_shop/photo_shop_cart";
-
Thanks for the fix, Stramm. As I said, I am trying to test it the way it would get used in the real world and people will surely go back and forth between the shopping cart and galleries. Maybe its my own ignorance, but I seldom pay attention to that JPOST message - mostly because I am not a programmer and never understood what that was really telling me. I usually just click OK and go. This is the first instance where it seemed to have had any effect on the page I was going back to. Perhaps in a future release, a "Continue Shopping" button could be included in the shopping cart view that would circumvent the problem.
Again, thanks. I'm really impressed with the speed that you reply with fixes. :)
-
Hi Stramm
Thanx for this plugin, I'm going to use it on my new site soon.
However, it is in fact a good idea to add "Continue Shopping" button, that takes you back to the originated thumbnail page.
I've tried to add a button (with success) and tried to implement the "javasript:history.go(-2)" code, but with no success.
Any suggestions ?
-
Try spelling javascript correctly.
-
Sorry Nibbler ... I'm tired trying to figure this out.
What I have done is added the line:
<input type="submit" class="button" name="continue_shopping" value="{$lang_photoshop['continue_shopping']}" />
after
<input type="submit" class="button" name="empty_basket" value="{$lang_photoshop['empty_basket']}" />
(* Also fixed the lang file)
and
if (isset($_POST['continue_shopping'])) {
photoshop_refresh($_SERVER['PHP_SELF'].'?file=displayimage.php?album=$aid$cat_link&pos={$thumb['pos']}$uid_link'); // TO FIX LINK
exit;
}
after
} elseif(isset($_POST['empty_basket'])) {
setcookie($CONFIG['cookie_name'] . '_cart', '', time() + 86400 * 30, $CONFIG['cookie_path']);
unset ($_SESSION['photoshop']['cart']);
photoshop_refresh($_SERVER['PHP_SELF'].'?file=photo_shop/photo_shop_cart&box='.$box);
exit;
}
Question: I do get an error ... but is this possible to get the code to work ?
-
Try
photoshop_refresh("displayimage.php?album=$aid$cat_link&pos={$thumb['pos']}$uid_link"); // TO FIX LINK
-
Thanx Nibbler
I get this error: "The selected album/file does not exist !"
-
Hello!!
I have a coppermine gallery with photo shop plugins configured correctly.
But i need to insert a button in the bottom of a image or in a thumbnail for my customers choose "add to cart" correctly with the right image.
How i put a radio button with the correct image,in the description under the image?
Have any solution for my problem?
my gallery is http://shishas.4sql.net/geral/ (http://shishas.4sql.net/geral/)
Thanks :D
-
if you mean in thumbnail view, then that functionality isn't coded into this plugin
-
Hey
Can you help me ,to improve the plugin...
I want insert a button under the bottom of some images , for my customers buy the specific image that belongs to a produt.
I think with some aditional code we can do this,every image have a code id item that belongs to the right image.
I want eliminate the choose button that i have now there in the top of the images,and put only a button in the bottom that have "add" to basket .
The photo shop plugin works good,but for me this aditional code it will be perfect for my website!
Thanks, :D
-
you can edit that in codebase.php ... pretty easy. Right after
//loop through the items and create forms
The shops form (dropdown) gets calculated and saved into a var ($shop_data)
Change that to your needs. Make it a button or whatever.
To make it appeare below the intermediate image and not above you have to scroll down a few lines, find
$pic_data['html'] = $shop_data.$pic_data['html'];
and change it to
$pic_data['html'] .= $shop_data;
-
[Off Topic]
i need to insert a button in the bottom
A nice way to feel pain? ;) ;D
[/Off Topic]
-
Thank you Stramm for your help!
Your are the best here! ;)
And thanks for make this good plugin and give suport!
I not very good leading with code,but i like it,its something for me, new to start and discovery!
This is the code that i guess i need to change like you said to me in the last post:
<form action="{$REFERER}" method="post">
{$added}{$lang_photoshop['buy']} {$html}
<input type="hidden" value="{$pic_data['pid']}" name="pid" />
<input type="hidden" value="add_item" name="event" />
<input type="submit" value="{$lang_photoshop['send']}" class="comment_button" />
<input type="submit" value="Add to cart">
</form>
I add "<input type="submit" value="Add to cart>" The submit button to make the purchase,but is not storing the results in the variable,i want to save the value into the var ($shop_data) correctly like you said,but i dont know how...
If i change "$pic_data['html'] = $shop_data.$pic_data['html'];" to "$pic_data['html'] .= $shop_data;" i can see the images,after the change,so i left the code in the same.
Thanks,
Sandra
-
Hi Stramm,
Im trying to implement a cart-wide discount system for your Photo Shop. Its fairly simple. Any second, third fourth copies of any image ordered are recieved at half price.
So if at the moment we say that your cart calculates a sub total for an item by
quantity x price = subtotal
this discount could be applied by modifying this to
Price + ( {quantity-1} x price)/2 = subtotal
If we have one copy in the cart this will be charged at full price
If we have two copies in the cart, the second would only add half of the price on etc etc
Great.
Now if i were to try and implement this, could you point me in the right direction. My PHP is limited, but im playing catch up a little, to try and sort this!!
Many thanks
Dave
-
If I remember right, then there are 2 places where you need to do some changes
1. functions.inc.php (the plugins one)
find and edit the formula as you need it
$return[0] += $amount*$price;
Same for photoshop_cart.php
find and replace with your formula (2x)
$photo_price += $amount*$price;
The code in photoshop_cart.php is kinda redundant. I've written the function and use it nearly everywhere but haven't optimized the code in photoshop_cart.php yet.
-
hahaha, many thanks stramm, spot on!!
Here is my code
in include/function.inc.php
find the code
$return[0] += $amount*$price;
.
replace with php$photo_price += $price+(($amount-1)*$price)/2;
Then in photo_shop_cart.php
find two occurances of
$photo_price += $amount*$price;
and replace with
$photo_price += $amount*$price;
Voila.
This will apply a half price discount to any quantity over 1, of the same image bought
Dave
-
Hi Stramm
I'm busy creating and upgrading my website with coppermine 1.4.10. I'm using your photo_shop plugin as my primary on-line sales tool.
By the way I think you did a freat job with it sofar ! I think (and know) that your ohoto shop will be used by many, it's a great add-on to coppermine.
However ...
Is it possible to edit the files so you can sent the txt email (and check_out page) to display the items baught ... nicely in a row ( ID, Type, Size, Amount, Total, etc) ?
Also, I have read here somewhere for the users to have a "My Orders" section. Will this materialize ?
It will be nice for them to get a history of their online orders, and a detailed ORDER or INVOICE as suggested above.
Anyway, hope to get a reply from you soon ...
Feel free to test my website at: http://www.youth-sport-fotos.com/fotos/
-
Is it possible to edit the files so you can sent the txt email (and check_out page) to display the items baught ... nicely in a row ( ID, Type, Size, Amount, Total, etc) ?
This of course is possible. Some code needs to be rewritten for that. Atm there's no function yet for creating the basket and the checkout list. So one either needs to code the exact same stuff a third (or fourth) time or you write a function and think about a template system for that. A lot of work ...
Also, I have read here somewhere for the users to have a "My Orders" section. Will this materialize ?
Such a 'My Orders' section isn't that hard to do if you integrate the link into the sub (or sys) menu. Basically a stripped down version of the admin system. If you however (my fav) don't want to clutter the menu even more, then the only option where you could place the link elsewhere is the users profile. Unfortunately there are no plugin hooks (and it's fairly complex to add some there) so you'd have to mod that file.
-
Is it possible to edit the files so you can sent the txt email (and check_out page) to display the items baught ... nicely in a row ( ID, Type, Size, Amount, Total, etc) ?
OK, I've added some basic invoice feature. It automatically gets sent with the order confirmation email to the user and the webmaster. There's a new entry in the lang file that defines the invoice header (your address).
The invoice is in plain text. I've put it in pre tags if your email client is set to display all emails as html. However it has additional line breaks in that 'mode'. Best is to view the email as plain text.
I've decided to clear the shop cookie (after the user confirmed his order) somewhen later. So it's possible to display all the orders on the confirmation page again. If you do not want that, you need to uncomment in photo_shop_checkout.php the three lines after
//comment out if you don't want the orders to appeare on the order confirmed page
Downside of the addition is, that the cookie an be cleard after the confirmation page has been created. Means it still shows items in the basket while it is empty. When clicking continue or after the first refresh the cleared cookie has its desired effect and the basket shows as empty.
If you do not like that, move the code that clears the cookie to the place it has in the orig code.
edit: removed the attachment and uploaded a new photo shop version 1.3.4
http://forum.coppermine-gallery.net/index.php?topic=32231.0
-
new version 1.3.4 is out
new:
- invoice in confirmation emails (see above)
- discounts
edit:
I've decided to add one more
- MyOrders page
- Minithums support (if you use the modpack)
-
Great !! Thanks Stramm :D
-
to only ahow the 'MyOrders' button to logged in users replace the entire function photoshop_user_menu with
function photoshop_user_menu(&$html){
global $template_sys_menu_spacer, $lang_photoshop;
if (!strpos($html,'{CART_MENU}')) {
$html = str_replace('{SUB_MENU}','{SUB_MENU} <br /> {CART_MENU}',$html);
}
//if you do not want the MyOrders page then uncomment the following line and comment out the one with the menu entry
//$cart_menu = "<a style=\"padding:2px;\" class=\"admin_menu\" href=\"index.php?file=photo_shop/photo_shop_cart\">".photoshop_count()." {$lang_photoshop['in_cart']}</a> ".$template_sys_menu_spacer." <a href=\"index.php?file=photo_shop/photo_shop_checkout\" style=\"padding:2px;\" class=\"admin_menu\">{$lang_photoshop['checkout']}</a>";
$cart_menu = "<a style=\"padding:2px;\" class=\"admin_menu\" href=\"index.php?file=photo_shop/photo_shop_cart\">".photoshop_count()." {$lang_photoshop['in_cart']}</a> ".$template_sys_menu_spacer;
if (USER_ID) $cart_menu .= " <a href=\"index.php?file=photo_shop/photo_shop_myorders\" style=\"padding:2px;\" class=\"admin_menu\">{$lang_photoshop['myorders']}</a> ".$template_sys_menu_spacer;
$cart_menu .= " <a href=\"index.php?file=photo_shop/photo_shop_checkout\" style=\"padding:2px;\" class=\"admin_menu\">{$lang_photoshop['checkout']}</a>";
$html = str_replace('{CART_MENU}',$cart_menu,$html);
return $html;
}
Recommended cause anon users can't use that functionality and just get a 'No orders' message.
-
Hi Stramm - good upgrade.
How can i turn off 'my orders' completely - i cant spot it!!!
dave
-
Sorry!! read the manual!!
I ve got it!
But i do seem to have a lost the thumbnail on the checkout page? what havnt i read!!?
Dave
-
What thumbnail have you lost? Please post a link
-
hmmmmm, well ive made a mess of it all now!
I tried to revert back to previous version of the cart, and that failed..and then ofcourse the new version is no longer working! ive unistalled and reintalled, and the same.
So i think i might clean install, and try again - ill keep you posted on the thumbnail issue!
dave
-
What thumbnail have you lost? Please post a link
I've got the same problem... You can see it by going to www.dancamphoto.com and adding a photo to the cart. Then press the checkout button. Then you can see, that only thing under "Item ID" is a black dot. No photo. I need to fix this before I can accept orders, but have no idea how.
It's an awesome mod, I feel bad having to ask for help... I tried to figure out how to fix it myself, but couldn't find a solution.
Thanks for any advice anyone can contribute.
-
Link to the gallery is http://www.dancamphoto.com/gallery/
You're using the modpack... both helpful info
I guess you enabled mini thumbs but without actually creating them. So either run the admin tools to create these mini thumbs or disable them in config (Files and thumbnails settings).
-
Link to the gallery is http://www.dancamphoto.com/gallery/
You're using the modpack... both helpful info
I guess you enabled mini thumbs but without actually creating them. So either run the admin tools to create these mini thumbs or disable them in config (Files and thumbnails settings).
*slaps forehead*
Geesh, dumb me! You think I'd at least give you the right URL. Thanks for being so proactive in helping me regardless of my incompetence.
You were right. I used the tool to create the thumbs, and all is fixed.
Thanks Stramm, this mod is simply awesome.
-
Hi folks,,
Yup i had the same problem as above, so thats sorted, thanks!!!
I have two questions now ( are two allowed, i fear not!?)
If i want to use a discount system that will be applied to when there are more than one of a specific file. ie when the amount is greater than 2 for one file. can i do this? what is the varible for this?
secondly i have a "%" that appears when a discount is applied so my last line in the cart, prior to the Total reads..
Discount :: % 1.50GBP
I am not applying a percentage discount, where is this % coming from, i have looked in the language file, and i cant see it!
Any pointers Stramm!?
Regards
Dave
-
you can change the % in functions.inc.php, function photoshop_format_price
if ($discount > 0) { $out['text'] .= sprintf("%+63s\n", $lang_photoshop['discount'].' :: %'.$discount.$lang_photoshop['USD']); }
the relevant part is :: %
In my country it's also the mercantile symbol for a subtraction
The discount is possible but you'll have to do some more calculating.
Check the function photoshop_count_items
It loops through all items of the basket and the var $amount holds the number. $item_id holds the id of the pic type you sell.
basically you copy that function. If $amount is > 1, you can grab the price of an item with
$price = $SHOP_CONFIG[$item_id]['price'];
$name = $SHOP_CONFIG[$item_id]['name'];
$name holds the name of the product, eg. 4x6 inch print (depending what you've set up).
You know when an photo is >1 times in the basket (for a certain goods group) and you know it's price. So basically you can do some calculation like
if ($amount >1) $discount .= ($amount-1) *$price / 2;
if you have 3 pics 4x6 of pid 23 in the basket the first would get priced full, the others 50%
Unfortunately we have another functionality to take into account, the price override (you can specify different price levels on a per album basis). Including this the new function would look like...
function calculate_discount($temp_price, $cd_counter){
global $SHOP_CONFIG, $CONFIG;
$discount = '';
foreach($_SESSION['photoshop']['cart'] as $key => $temp){//foreach count photo items
$item_id = (isset($_SESSION['photoshop']['cart'][$key]['id'])) ? $_SESSION['photoshop']['cart'][$key]['id'] : '';
$amount = (isset($_SESSION['photoshop']['cart'][$key]['amount'])) ? $_SESSION['photoshop']['cart'][$key]['amount'] : '';
$aid = (isset($_SESSION['photoshop']['cart'][$key]['aid'])) ? $_SESSION['photoshop']['cart'][$key]['aid'] : '';
//price override
$price = $SHOP_CONFIG[$item_id]['price'];
$results = cpg_db_query("SELECT * FROM {$CONFIG['TABLE_SHOP_PRICES']} WHERE aid={$_SESSION['photoshop']['cart'][$key]['aid']}");
while ($temp_data = mysql_fetch_array($results)) {
if($temp_data['gid']==$SHOP_CONFIG[$item_id]['id'])
$price=$temp_data['price'];
}
mysql_free_result($results);
if ($amount > 1) $discount .= ($amount-1) * ($price / 2);
}
return $discount;
}
This isn't tested at all
-
Hi Stramm,
thanks for the reply - ill give this a go over the weekend a report back!
I have anothe issue (sorry!!)
the paypal button returns an error from paypal (Return to Merchant - We cannot process this transaction because there is a problem with the PayPal email address supplied by the seller......)
I have changed the email address (once) in the include/gateway.inc.php
Do i need to something else!?
Many thanks
Dave
-
Once again - sorted my silly little problem. Just a simple spelling mistake in the folder structure, sorry to bother you all.
-
Hello, and thanks for a great plugin! :)
I found some issues, one is with the checkout page. The thumbnails seemed to be missing if you have the 'enable_mini_thumbs' unset, but in fact they were sized 0x0, so it was easy to fix - you just have to edit 'photo_shop_checkout.php' and replace the following:
$ratio = max($row_pic['pwidth'], $row_pic['pheight']) / $new_size;
$ratio = max($ratio, 1.0);
$destWidth = (int)($row_pic['pwidth'] / $ratio);
$destHeight = (int)($row_pic['pheight'] / $ratio);
with these:
$ratio = max($row['pwidth'], $row['pheight']) / $new_size;
$ratio = max($ratio, 1.0);
$destWidth = (int)($row['pwidth'] / $ratio);
$destHeight = (int)($row['pheight'] / $ratio);
Another problem that I have is that after the order is placed and the final info about the email being sent is displayed, the item summary seems to be misplaced and that totally borks the layout... :(
Here is an account to check that: user Tester, pass 4testing2g0 (http://krypa.homelinux.net/cpg)
Also, has the shipment selection radio been implemented? I don't get any, and the shipment price is always the lowest one - so if you have a 'retrieve in person' with 0 cost, everyone gets in no matter if they want or not...
And finally, I wrote a Polish translation for the shop (hope you find it useful)...
-
Thanks for pointing out the lil problem. Has been addressed in the attached photo_shop_checkout.php
For the shipment... no changes since the last version, means you can only set it globally.
Oh, and thanks for the translation. Much appreciated ;)
-
Thanks very much for that. :) Your speed truly is amazing... ;)
I also found another detail I forgot to write about earlier. In the orders panel the discount does not get displayed (ie. I get "Ilosć: 87.20PLN - w tym zniżki %discount" or "Order volume: 87.20PLN - incl. shipping %discount"). I've been looking for the source of this, but I can only conclude that the '%discount' does not get replaced by the real discount value (if it is that) in the 'incl_ship' string. I don't know why that is...
EDIT: Oh I know what it is now... Took a look at the other translations. The % sign was a bit misleading. ;) I updated the 'polish.php.zip' file in the earlier post.
-
Strange... I checked and double checked my lang file but found no problem yet I still show the "Order ID: 40 - Items: 13 - USD total: 13.70 incl. shipping %discount"
Hopefully this can be explained.
Anyhow, I found a couple problems with the Google Checkout portion.
1: gateway.inc.php: locale was using the same identifier as button style.Line 74: $CONFIG['photo_shop_google_button_style'] = 'trans';
Line 77: $CONFIG['photo_shop_google_button_style'] = 'en_US';
Line 77 should reflect the following...$CONFIG['photo_shop_google_button_loc'] = 'en_US';
2: photo_shop_checkout.php: Found two </form> ending tags which caused incomplete data to be sent to google checkout. I simply removed the first </form> from Line 140.
Other than that... Google Checkout is working normally.
Thank you so very much for the updates to this plugin!
-
thanks for your feedback on the google checkout implementation. I wasn't able to test it so I'm in need for any feedback possible. I've added your suggestions to my local copy.
the discount thingie. I'm not really sure what you're up to. If the % sign is your problem, then read http://forum.coppermine-gallery.net/index.php?topic=32231.msg208922#msg208922
If the word 'discount' is your problem... it just should appeare if the conditions for the discount are set. I've explained the new discount feature in the announcement post (1 post in this thread), also in codebase.php. Some explaining in the above mention post too.
Hope that helps
-
My! You are fast!
My apologies. I was assuming that the word discount would only show if the order qualified for a discount.
I have my functions.inc.php set to discount if more than 10 images are ordered for prints. However, orders that have only 2 images to print still show the word discount.
"Order ID: 8 - Items: 2 - USD total: 6.00 incl. shipping %discount"
Granted, there is no discount information included within the financial totals so the total price being charged to the customer is not effected. When the discount is applied or not, the overall totals reflect the correct amounts.
I suppose I could just edit the language file to show "incl. shipping and discount (if applicable)"
-
ahh, OK, have seen what you mean, the entry in the shop admin.
That's in the lang file, array $lang_photoshop_admin, incl_ship
It's just stating that in that total shipping and discount is included if applicable.
-
New version 1.3.5
- you now have the possibility to set shipping per item; customizable within the function (similar to the discount system).
-
@stramm, nice mod ;-)
if i add a picture the language is english:
click on shoppping cart
index.php?file=photo_shop/photo_shop_cart
also english -> checkout page is correct in euro ?
btw: where can i change the paypal account ?
-
Redownload 1.3.5 from my site and install it. I've improved language detection. In plugin environments it seem sto be somehow tricky sometimes.
paypal and all other billing solutions:
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
-
works great, thanks :-)
-
Hi Stramm
Great work so far. I'm using your shopping cart as primary tool for online orders.
I need to know the following. During registration, I added fields like user_address, user_tel, etc. to be saved in the user's table.
Now with the shopping cart, especially in photo_shop_admin and the emails sent to the admin and user, I want to include this fields. How do I do this ? Is there a simple way just to add a couple of sql query lines to get the information ?
It would also be nice to include the Order ID in the subject of the emails. How do I do this ?
Hope you can help.
Keep up the good work.
-
in the admin.. basically it's in there, just click the user's name to open his profile (shift+click to open it in a new window). To show all profile info in the shop admin is confusing and far to much info (imho). Probably useful in the detailed order overview if the webmaster requires this info (as I do). But you have the possibility here too, to open the profile (click on username)
to add more profile info to the email... easy to do, and I'll keep the changes for later releases
in photo_sho_checkout.php find
'{LINK}' => $CONFIG['ecards_more_pic_target'],
below add
'{USER_PROFILE1}' => $user_info['user_profile1'],
'{USER_PROFILE2}' => $user_info['user_profile2'],
'{USER_PROFILE3}' => $user_info['user_profile3'],
'{USER_PROFILE4}' => $user_info['user_profile4'],
'{USER_PROFILE5}' => $user_info['user_profile5'],
'{USER_PROFILE6}' => $user_info['user_profile6'],
now you can use the placeholders {USER_PROFILE1} - {USER_PROFILE6} in your email templates to the user and admin (to be found lang file(s))
Order id in the subject:
in the same photoshop_email_the_user where you just did your first changes find 2-3 lines below in the function call cpg_mail the variable $subject and replace it eg with
$subject.', Order ID: '.$order_id
to get a result like
Thanks for your order, Order ID: 107
to the admin it'll look like
You got a new order, Order ID: 107
-
Hi Stramm
Thanx a lot man, your the best !
The reason why I want to have the {USER_ADDRESS} on the admin page is that it would be much easier for me to print out the page for my files when doing the actual order.
You suppose I can include (put) $user_data['user_address'] on the spot in the admin page where I want the address to appear ?
-
no, hehehe, it's not that easy, just thinking one needs the address and therefore typing somewhere {USER_ADDRESS} would bring that up is magic
you'll first need to get the data from the db
-> photo_shop_admin.php
find
$sql = "SELECT s.*, u.{$udb_var['field']['username']}, u.{$udb_var['field']['email']} FROM {$CONFIG['TABLE_SHOP']} AS s LEFT JOIN {$udb_var['usertable']} as u ON u.{$udb_var['field']['user_id']} = s.uid WHERE oid=".$oid." AND cd=1 LIMIT 1";
and replace it with
$sql = "SELECT s.*, u.* FROM {$CONFIG['TABLE_SHOP']} AS s LEFT JOIN {$udb_var['usertable']} as u ON u.{$udb_var['field']['user_id']} = s.uid WHERE oid=".$oid." AND cd=1 LIMIT 1";
that could will get the additional data (all user data) from the db, therefore the detailed list got replaced with *
We need (same as in my post above) the fields user_profile1 - user_profile6 (not address ;) )
Now we add that additonal info to the detailed order view
-> again photo_shop_admin.php find ~line 550
<span style="cursor:pointer" onclick="window.location='profile.php?uid={$row['uid']}';">{$row['user_name']} - </span> -
and replace
{$row['user_name']} -
with
{$row['user_name']} - {$row['user_profile1']} - {$row['user_profile2']} - {$row['user_profile3']} - {$row['user_profile4']}
of course you can insert user_profile5 and user_profile6 too, also you can chose a different place to place the address, that's just an example placement
-
Hi Stramm
Thanx a lot man, yet again, you are just a STAR !
It all works well ... for the record, I have a field name "user_address".
Now, on my admin page, its shows the adrress like:
PO BOX 5555 CAPE TOWN 8000 (in one line) and not like
PO BOX 5555
CAPE TOWN
8000
How do I fix this ?
Thanx for your quick and VERY helpful help !
-
Individual issues should imo go into separate threads and not into the announcement thread. This thread is very cluttered (because it's a "hot" one) already.
-
GauGau
Where and on what board should we post questions about this Shopping Cart (Photo Shop) then ?
-
cpg1.4 plugins (http://forum.coppermine-gallery.net/index.php?board=53.0)
-
i have installed the gallery and then went to install the photo shop module i have recived the following error, how do i fix these errors.
There was an error while processing a database query
-
enable debug mode and post the actual error message
-
Critical error There was an error while processing a database
While executing query "insert into cpg_plugins (name, path,priority) values ("Photo Shop","photo_shop",5);" on 0
mySQL error: Duplicate entry 'Photo Shop' for key 2
Debug Info
USER:
------------------
Array
(
[ID] => 041d17d6d4995250e4e77edccb4e8b91
[am] => 1
[lang] => english
[liv] => Array
(
- => 45
[1] => 46
[2] => 43
[3] => 61
[4] => 65
)
[theme] => valentines
)
==========================
USER DATA:
------------------
Array
(
[user_id] => 1
[user_name] => chrisb
[groups] => Array
(
)
[disk_max] => 0
[disk_min] => 0
[can_rate_pictures] => 1
[can_send_ecards] => 1
[ufc_max] => 3
[ufc_min] => 3
[custom_user_upload] => 0
[num_file_upload] => 5
[num_URI_upload] => 3
[can_post_comments] => 1
[can_upload_pictures] => 1
[can_create_albums] => 1
[has_admin_access] => 1
[pub_upl_need_approval] => 0
[priv_upl_need_approval] => 0
[group_name] => Administrators
[upload_form_config] => 3
[group_quota] => 0
[can_see_all_albums] => 1
[group_id] => 1
)
==========================
Queries:
------------------
Array
(
- => SELECT extension, mime, content, player FROM cpg_filetypes; (0s)
[1] => select * from cpg_plugins order by priority asc; (0s)
[2] => delete from `foreverl_copp1`.cpg_sessions where time<1181899281 and remember=0; (0s)
[3] => delete from `foreverl_copp1`.cpg_sessions where time<1180693281; (0s)
[4] => select user_id from `foreverl_copp1`.cpg_sessions where session_id=md5("54c610b98bb925606d6bb129dc43a51a1a7a7fc37f8facf38c81dd206dbf61bf"); (0s)
[5] => select user_id as id, user_password as password from `foreverl_copp1`.cpg_users where user_id=1 (0s)
[6] => SELECT u.user_id AS id, u.user_name AS username, u.user_password AS password, u.user_group+100 AS group_id FROM `foreverl_copp1`.cpg_users AS u INNER JOIN `foreverl_copp1`.cpg_usergroups AS g ON u.user_group=g.group_id WHERE u.user_id='1' (0s)
[7] => SELECT user_group_list FROM `foreverl_copp1`.cpg_users AS u WHERE user_id='1' and user_group_list <> ''; (0s)
[8] => SELECT MAX(group_quota) as disk_max, MIN(group_quota) as disk_min, MAX(can_rate_pictures) as can_rate_pictures, MAX(can_send_ecards) as can_send_ecards, MAX(upload_form_config) as ufc_max, MIN(upload_form_config) as ufc_min, MAX(custom_user_upload) as custom_user_upload, MAX(num_file_upload) as num_file_upload, MAX(num_URI_upload) as num_URI_upload, MAX(can_post_comments) as can_post_comments, MAX(can_upload_pictures) as can_upload_pictures, MAX(can_create_albums) as can_create_albums, MAX(has_admin_access) as has_admin_access, MIN(pub_upl_need_approval) as pub_upl_need_approval, MIN( priv_upl_need_approval) as priv_upl_need_approval FROM cpg_usergroups WHERE group_id in (1) (0s)
[9] => SELECT group_name FROM cpg_usergroups WHERE group_id= 1 (0s)
[10] => update `foreverl_copp1`.cpg_sessions set time='1181902881' where session_id=md5('54c610b98bb925606d6bb129dc43a51a1a7a7fc37f8facf38c81dd206dbf61bf'); (0s)
[11] => SELECT user_favpics FROM cpg_favpics WHERE user_id = 1 (0s)
[12] => SELECT * FROM cpg_mark_users WHERE user_id = 1 (0s)
[13] => SELECT * FROM cpg_mark_config (0s)
[14] => DELETE FROM cpg_banned WHERE expiry < '2007-06-15 10:21:21' (0s)
[15] => SELECT * FROM cpg_banned WHERE (ip_addr='220.239.183.24' OR ip_addr='220.239.183.24' OR user_id=1) AND brute_force=0 (0s)
[16] => select plugin_id from cpg_plugins where path="photo_shop"; (0s)
[17] => select priority from cpg_plugins order by priority desc limit 1; (0s)
[18] => insert into cpg_plugins (name, path,priority) values ("Photo Shop","photo_shop",5); (0s)
[19] => SELECT COUNT(*) FROM cpg_pictures WHERE approved = 'NO' (0s)
)
==========================
GET :
------------------
Array
(
[op] => install
[p] => photo_shop
)
==========================
POST :
------------------
Array
(
[submit] => Go!
)
==========================
VERSION INFO :
------------------
PHP version: 4.4.4 - OK
------------------
mySQL version: 4.1.22-standard
------------------
Coppermine version: 1.4.10(stable)
==========================
Module: GD
------------------
GD Version: bundled (2.0.28 compatible)
FreeType Support: 1
FreeType Linkage: with freetype
T1Lib Support:
GIF Read Support: 1
GIF Create Support: 1
JPG Support: 1
PNG Support: 1
WBMP Support: 1
XBM Support: 1
JIS-mapped Japanese Font Support:
==========================
Module: mysql
------------------
MySQL Supportenabled
Active Persistent Links 0
Active Links 1
Client API version 4.1.22
MYSQL_MODULE_TYPE external
MYSQL_SOCKET /var/lib/mysql/mysql.sock
MYSQL_INCLUDE -I/usr/include/mysql
MYSQL_LIBS -L/usr/lib -lmysqlclient
==========================
Module: zlib
------------------
ZLib Support enabled
Compiled Version 1.2.3
Linked Version 1.2.1.2
==========================
Server restrictions (safe mode)?
------------------
Directive | Local Value | Master Value
safe_mode | Off | Off
safe_mode_exec_dir | no value | no value
safe_mode_gid | Off | Off
safe_mode_include_dir | no value | no value
safe_mode_exec_dir | no value | no value
sql.safe_mode | Off | Off
disable_functions | no value | no value
file_uploads | On | On
include_path | .:/usr/lib/php:/usr/local/lib/php | .:/usr/lib/php:/usr/local/lib/php
open_basedir | no value | no value
==========================
email
------------------
Directive | Local Value | Master Value
sendmail_from | no value | no value
sendmail_path | /usr/sbin/sendmail -t -i | /usr/sbin/sendmail -t -i
SMTP | localhost | localhost
smtp_port | 25 | 25
==========================
Size and Time
------------------
Directive | Local Value | Master Value
max_execution_time | 30 | 30
max_input_time | 60 | 60
upload_max_filesize | 8M | 8M
post_max_size | 16M | 16M
==========================
Page generated in 0.07 seconds - 20 queries in 0 seconds - Album set : ; Meta set: ;
-
looks like you're trying to install a plugin that's already installed. Uninstall older versions before installing the new one.
Read the install notes in the anouncement thread for version 1.3.5 and do as suggested
-
Hi Stramm, i am a german guy but try to write in english ;)
Thats a great plugin but where is the opportunity to add the tax of the countries, like germany with 19% V.A.T ?
At the end of each order there must be added the tax to the sum ???
I can´t find it or isn´t it impelemented?
Greetings
manyquestions
-
Usually tax is included in the price you show in the shop. Therefore support for tax isn't enabled atm. But you could 'abuse' the discount or shipping functionality (for shipping you still can set a global one if you do so).
If you do not want to add the tax to the total, but you just want to display it in the invoice, something like ' incl. 19% MWSt: 3.15 EUR', then you easily can do that in functions.inc.php function photoshop_format_price
-
Usually tax is included in the price you show in the shop. Therefore support for tax isn't enabled atm. But you could 'abuse' the discount or shipping functionality (for shipping you still can set a global one if you do so).
If you do not want to add the tax to the total, but you just want to display it in the invoice, something like ' incl. 19% MWSt: 3.15 EUR', then you easily can do that in functions.inc.php function photoshop_format_price
Thanks Stramm for your feedback.
Sorry, i am not a coder. What should i change to show the tax amount of the order at the end of the bill?
Thanks so much
manyquestions
-
function photoshop_format_price in functions.inc.php (the plugins one)
after
$tot_price = number_format(($temp_price[1]+$temp_price[0]+$shipping-$discount),2);
define the tax, eg.
$tax = number_format(($tot_price/119*19),2);
then add the calculated tax to the html output
looks something like (hardcoded)
<td colspan="6" align="right">
{$photo_price2}
{$cd_price2}{$error}
{$total_price}
<br/>Incl. MWSt.: {$tax}{$lang_photoshop['USD']}
</td>
now add it to the txt output (emails)
eg.
$out['text'] .= sprintf("%+63s\n", 'Incl. MWSt: '.$tax.$lang_photoshop['USD']);
right before
return $out[$template];
-
Hello
Just a quick thank you for this great plugin
I do have a question:
If a buyer desides that he wants to pay later and clicks on "continue" instead of, "paypal".
Is there a way to send him(the buyer) the paypal link in the "thank you for your order" email?
or can the buyer go back to the checkout page without having to reorder?
Thank you
-
in your paypal merchant tools create a buy now button for a single item (doesn't matter what values you use), make sure you check unencrypted, then you get a link to use in emails.
Now copy/ paste the email into the photo shop lang file into an anchor tag ($lang_photoshop_email_order),
replace the price you entered with {PRICE}, the Item ID/Number with {ORDER_ID} and the item name you entered with eg. Your%20order:%20{ORDER_ID}
that'll look similar to
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=webmaster%40coppermine%2ecom&item_name=Your%20order:%20{ORDER_ID}&item_number={ORDER_ID}&amount={PRICE}&no_shipping=0&no_note=1¤cy_code=EUR&lc=DE&bn=PP%2dBuyNowBF&charset=UTF%2d8">Pay with Paypal</a>
this sample uses the email addy webmaster@coppermine.com, Eur and the german paypal frontend
-
:o HOLY DOODLE BATMAN
That was quick (and easy)
Thanks!!
-
Hello,
I just installed CPG 1.4.11 and then PhotoShop 1.3.5 and I get an internal server error (500, no debug possible, no serverlog accessible :-() when I send an order in photo_shop_checkout.php. Everything else (adding pictures, administration, deleting orders, deleting pictures in orders) works like a charm. Any ideas?
Thank you,
Guido
-
An internal server error usually is what it claims to be, a server error while the server doesn't know a better message than that 'internal'.
To track down the culprit you should check your error logs. If you do not have access to the error logs, you'll have to ask your host to do so.
It may help to reupload the file that's making the troubles.
-
Thank you, the problem was a user without email address, which leads to a forbidden action on the server resulting in the internal server error - took some time to find...
-
Hello, some of my galleries are registered only, nevertheless I find you shop more than convient.
I've to add the following line to deny access by URL to: photo_shop_cart.php, photo_shop_checkout.php, photo_shop_myorders.php, photo_shop_register.php
if (!USER_ID && $CONFIG['allow_unlogged_access'] == 0) cpg_die(ERROR, $lang_errors['access_denied'], __FILE__, __LINE__);
A change to photshop_user_menu() in the codebase.php just after the global declaration inhibits the menu:
if (!USER_ID && $CONFIG['allow_unlogged_access'] == 0) return $html;
G.
-
Hi,
Hope this is the right topic for my question.
Looking for gallery software with shopping cart support I decided to go for CPG. During the test I've been doing for the last few days it turned out to have almost everything I hoped for.
The 'almost' is the reason for my post here.
I would like to add an additional service for my customers so they receive an Update e-mail when the order status changes.
(when payment is received and when the order is shipped)
Being a CPG newb I've been staring myself blind on the photo_shop_checkout.php and photo_shop_admin.php code to figure out a way to get my change working. So far no luck. The only result is a Critical error when I try to send the email.
While executing query "SELECT *, AS user_name,
AS user_email,
AS user_regdate,
AS user_location,
AS user_website
FROM WHERE = '1'" on
mySQL error: You have an error in your SQL syntax near 'AS user_name, ' at line 1
I see the table is missing but that's as far as I get.
FYI
I inserted a photoshop_email_the_user() call in the Switch dowhat_item section (case "mark_payed") of photo_shop_admin.php.
My Quick and dirty attempt to put a copy of functions photoshop_email_the_user() and photoshop_user_details() in photo_shop_admin.php didn't do the trick and to be honest I don't have a clue what to try next.
Has anybody tried to implement similar functionality (and got it working) or can somebody point me in the right direction to get this working?
Any help is appreciated.
-
you can set a single item as paid -> within the check if all pics of an order have been paid you call the mail function.
There's altready a query for the status... get the uid (user id of the user who did the actual order) too.
You'll have to modify the function photoshop_email_the_user() as well as it out of the box only is able to email the admin or the logged in user. But in the step before you grabbed the uid. That you can use to query for the user details in function photoshop_email_the_user()
-
Thanks for pointing me in the right direction Stramm!
I've got both parts (sending a notification when payment is received and when the order is shipped) working now.
I left out the price in the notification since I didn't feel like re-coding the calculation of items, discounts and shipping. Perhaps later...
Had some problems getting the mail template in de lang file to work, but finaly figured out not to put de additional mailcontent in the
if (defined('PHOTOSHOP_ORDER_PHP')) conditional.
Also adding require('include/mailer.inc.php'); helped ;)
Again thanks for your help!
-
Hi Stramm,
Since you where so helpful a few post above perhaps you can answer this question too ;D.
It's about different pricing used for some galleries.
I’ve set the default pricing for a 10 x 15 print to 2 Euro.
For one specific gallery I’ve set it to 3 Euro
When I log in as a regular user, put a photo in the cart and go to "My orders", I see the order with the non-default price.
So far so good.
The thing that imho is confusing is that the pricelist below the order overview shows the default pricing, and not the gallery specific pricing.
For now I removed the pricelist, but it would be nicer to have the pricelist back with correct gallery specific pricing.
Is there a simple solution to this "problem"?
And if so, where can this be ‘fixed’
-
I haven't add the 'per album prices' to the pricelist (as it can grow really huge with that).
Atm it shows the standard prices and the shipping (all shipping)
This data is stored in an array and you can easily read it. To get the additional data you'll need to do a db query (with a join to get the album name)
Just have a look at the function photoshop_pricelist() (plugins/photo_shop/include/functions.inc.php)
Before the echo you'll need to add the query (table shop_prices join albums). In the prices table aid is the album ID and gid the item id.
-
Thanks for your reply.
I now get the point.
I was thinking about listing only album specific prices, and when not set: list defaults.
Since I’m still testing on a local server I didn't keep in mind that actual customers would possibly order from more than one gallery at once.
My change would list all pricing for each gallery they had made selections from.
I now see that it would not be wise to implement this feature.
If album specific pricing is to be listed than the best place would be inside each gallery (but not in the shopping cart screens).
-
Heya, Im on startup to use this great mod for a project where a shop system for picures is needet.
ATM I have 2 problems with the system, one is very simple, the other one might need more explanation
1) I found that there are some points in the language file (english & german) missing so the table in the mail has no header description.
fixed this by adding the following line to the $lang_photoshop array:
german.php:
'item_id_checkout' => 'Item ID',
'type_chckout' => 'Format',
'amount_checkout' => 'Anzahl',
'total_checkout' => 'Preis',
english.php:
'item_id_checkout' => 'item ID',
'type_chckout' => 'dimension',
'amount_checkout' => 'count',
'total_checkout' => 'price',
the 2. problem might be a little more complicated:
- the coppermine system is integrated with a special bridge from mehdi (http://www.mehdiplugins.com/misc/index.htm) into a joomlaa 1.0.12 cms
- in the joomla cms i've installed the "User Extended" Component to integrate more user field on registration (like adress and so on)
the problem I now have, that by this plugin, a registration in the gallery (redirected to the cms) will stop at the point where the cms is generating an email.
the solution in this original mod, that the user wil be automatically "activated" and directed back to its basked wont work (deactivated by the bridge).
Does anyone have an idea how this could be reimplemented by using the bridged system?
Another problem i have is, when an unregistered user wants to check out, the system redirects him to the register form.
Well with the bridge he will be directly redirected to the user_extended registration form of the cms. But i need another redirection so he has before to accept the "system rules" (AGB).
I think this could be done by a manipulation of the following lines in the phptoshop_register.php:
//if user isn't logged in redirect to shop register/login page
if(!USER_ID) {
photoshop_refresh($_SERVER['PHP_SELF'].'?file=photo_shop/photo_shop_register');
exit;
}
Dont know, but will try out :)
EDIT
well I found another thing, that relies on the usage of the bridged mode:
If the user logs out with a filles shopping cart this one will stay active for the guest...
But the most worst thing is:
If i want to change the amount of pictures in the shopping cart, i get the error Message:
Illegal variable _files or _env or _get or _post or _cookie or _server or _session or globals passed to script.
And I dont know where this comes from
Live site to check this: http://www.pferdefotos-sh.de/coppermine
-
If the user logs out with a filled shopping cart this one will stay active for the guest...
-->cookie problem???
-
I do not know Joomla or the bridge so I can't help you much there. You could just disable the redirection to the photo_shop login/ register site and instead display a message 'To finish your order you need to log in' or similar. That'll solve your problem 1+2.
That message
Illegal variable _files or _env or _get or _post or _cookie or _server or _session or globals passed to script.
I guess it's from Joomla... you need to search there
If the user logs out with a filled shopping cart this one will stay active for the guest...
This is expected behaviour.
The not logged in user can add items to his basket. If he logs in, the items will stay in the basket. If the browser crashes or he logs out and later comes back, the items still will be active.
Probably you mean the items will now show for all not logged in users??? No, that's not the case. Only for the user with the cookie saved on his computer.
And thanks for spotting the missing lang file entries.
-
Thx for your answers
well the fact that the cookie stays acrive on browser reload and saves by this the basket helps with the registration thing on the bridged system.
- ATM i changed the redirection at check out from login to a static content item.
- there the guest has to accept the rules (AGB)
- then gets forwarded to the registration.
By the fact that this is a modded joomla registration, ill need to mod the mod, if i want to skip the email for shop users.
well this would be the not so heavy thing i hope :P
with the other error...h,, maybe i find where the joomla code forces this Illegal variable error....
Interesting is:
- I can delete an item in the basked via the X
- but cannot change the values
How are these 2 things implemented?
GET or POST ? special things?
EDIT:
I found the code snipped that forces this error in joomla:
globals.php
/**
* Adds an array to the GLOBALS array and checks that the GLOBALS variable is
* not being attacked
* @param array
* @param boolean True if the array is to be added to the GLOBALS
*/
function checkInputArray( &$array, $globalise=false ) {
static $banned = array( '_files', '_env', '_get', '_post', '_cookie', '_server', '_session', 'globals' );
foreach ($array as $key => $value) {
$intval = intval( $key );
// PHP GLOBALS injection bug
$failed = in_array( strtolower( $key ), $banned );
// PHP Zend_Hash_Del_Key_Or_Index bug
$failed |= is_numeric( $key );
if ($failed) {
die( 'Illegal variable <b>' . implode( '</b> or <b>', $banned ) . '</b> passed to script.' );
}
if ($globalise) {
$GLOBALS[$key] = $value;
}
}
}
/**
* Emulates register globals = off
*/
function unregisterGlobals () {
checkInputArray( $_FILES );
checkInputArray( $_ENV );
checkInputArray( $_GET );
checkInputArray( $_POST );
checkInputArray( $_COOKIE );
checkInputArray( $_SERVER );
if (isset( $_SESSION )) {
checkInputArray( $_SESSION );
}
$REQUEST = $_REQUEST;
$GET = $_GET;
$POST = $_POST;
$COOKIE = $_COOKIE;
if (isset ( $_SESSION )) {
$SESSION = $_SESSION;
}
$FILES = $_FILES;
$ENV = $_ENV;
$SERVER = $_SERVER;
foreach ($GLOBALS as $key => $value) {
if ( $key != 'GLOBALS' ) {
unset ( $GLOBALS [ $key ] );
}
}
$_REQUEST = $REQUEST;
$_GET = $GET;
$_POST = $POST;
$_COOKIE = $COOKIE;
if (isset ( $SESSION )) {
$_SESSION = $SESSION;
}
$_FILES = $FILES;
$_ENV = $ENV;
$_SERVER = $SERVER;
}
/**
* Emulates register globals = on
*/
function registerGlobals() {
checkInputArray( $_FILES, true );
checkInputArray( $_ENV, true );
checkInputArray( $_GET, true );
checkInputArray( $_POST, true );
checkInputArray( $_COOKIE, true );
checkInputArray( $_SERVER, true );
if (isset( $_SESSION )) {
checkInputArray( $_SESSION, true );
}
foreach ($_FILES as $key => $value){
$GLOBALS[$key] = $_FILES[$key]['tmp_name'];
foreach ($value as $ext => $value2){
$key2 = $key . '_' . $ext;
$GLOBALS[$key2] = $value2;
}
}
}
if (RG_EMULATION == 0) {
// force register_globals = off
unregisterGlobals();
} else if (ini_get('register_globals') == 0) {
// php.ini has register_globals = off and emulate = on
registerGlobals();
} else {
// php.ini has register_globals = on and emulate = on
// just check for spoofing
checkInputArray( $_FILES );
checkInputArray( $_ENV );
checkInputArray( $_GET );
checkInputArray( $_POST );
checkInputArray( $_COOKIE );
checkInputArray( $_SERVER );
if (isset( $_SESSION )) {
checkInputArray( $_SESSION );
}
}
wel now i need to find out why/how the post variable from the shop forces this error....narf
-
just check the code...
photo_shop_cart.php, the first lines
empty basket and apply modifications (changing the item numbers) -> POST
delete item -> REQUEST
when I search the web for your 'error message' I get some joomla threads.. maybe it's woth to read them ... tells to use the 'new' globals.php
And if you do not want the cookie... then don't save it. The shop uses both, sessions and cookies.
codebase.php -> function photoshop_add_item()
-
yea found them also, the problem is as far as i could read out, the thing that numeric values are in the post array:
Array
(
[file] => photo_shop/photo_shop_cart
)
Array
(
[item_id] => Array
(
[0] => 0
)
[0] => 1
[box] => photo
[apply_modifs] => Speichere neue Anzahl
)
// PHP Zend_Hash_Del_Key_Or_Index bug
$failed |= is_numeric( $key );
and thy are not allowed...
well I could now comment the is_numeric check out but more likely I would change the shopping basked code :P
-
then why not recode the shop?? Make the number of items and the item id non numeric, add a letter to it, like 'n' or 'r', later you have to remove that again.
Some work
or... REQUEST isn't banned in globals.php... change POST to REQUEST
-
ok I managed it bay adding a text part to the element:
for those others who might be searching for a solution for the error
Illegal variable _files or _env or _get or _post or _cookie or _server or _session or globals passed to script.
when modifing the amount of items:
photo_shop_cart.php
search:
$_SESSION['photoshop']['cart'][$item_id]['amount'] = $_POST[$item_id];
replace:
$_SESSION['photoshop']['cart'][$item_id]['amount'] = $_POST['count'.$item_id];
search:
<input type="text" class="textinput" maxlength="5" style="width: 20px" name="{$key}" value="{$amount}"/>
replace:
<input type="text" class="textinput" maxlength="5" style="width: 20px" name="count{$key}" value="{$amount}"/>
-
Stramm, 2 questions:
in my test system I have a list of the following orders:
(http://www.vmm-is.de/files/photo_cart.jpg)
well this looks nice at first but what confuses me:
There are User ID's listet of 62 and 65 but the highest key in the DB's user table ist 6 on this system ???
codearea ~428 in photo_shop_admin.php
<div class="smallfont">
<span style="float:right;"><a href="index.php?file=photo_shop/photo_shop_zip&oid={$oid[$k]}">{$lang_photoshop_admin['download_zip']}</a></span><br>
<span style="float:right;"><a href="mailto:{$user_email[$k]}">{$user_email[$k]}</a></span>
<span style="cursor:pointer" onclick="window.location='index.php?file=photo_shop/photo_shop_admin&oid={$oid[$k]}&box={$box}';">{$lang_photoshop_admin['order_id']}: {$oid[$k]} - {$lang_photoshop_admin['user_id']}: {$uid_tmp[$k]}</span>
</div>
it seems for me like the uid gets mixed up while an order is getting stored into the shop table, right or did i miss something?
photo_shop_checkout.php -> photoshop_add_data() around 357ff
$results = cpg_db_query ("INSERT INTO `{$CONFIG['TABLE_SHOP']}` (`oid`, `uid`, `pid`, `quantity`, `size`, `price`, `otime`) VALUES ('$order_id', '".USER_ID."', '$pid', '$amount', '$size', '$price', '$otime')");
Hmm how can USER_ID get mixed up here.....
-
In that gray table cell you'll usually see the user name (clickable -> profile). I assume there'S a problem with your joonla bridge. With a standard install (standalone, smf) I wasn't able to reproduce your problems.
-
Quick question, which I expect has been asked and answered before so sorry in advance :) I did have a search around and browsed this thread but couldnt see anything..
With the shopping cart plugin can you define which albums photos can be bought from? I have several albums which I would like to be able to sell photos from, but I also have several albums which I do not wish to sell photos from. I want all the albums to be viewable by any user group etc so cant just restrict it that way somehow..
Thanks!
-
from the first post in this very thread
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
-
:D Thank you! will give it a whirl now
-
@ Stramm
I manaeged to find out the problem for the missing data in the admin area (missing profile Link and email).
Well I by myself was wrong with the idea of mixed ID's ... got mixed up by myself while browsing the tables... :P
Well the reason for this problem on a bridged shop is, that the colnames are hardcoded in the photosop_admin.php around line 380ff
this works fine in the original cpg, but when the names change due bridge use, the bridge data should be used:
old code:
while($i=mysql_fetch_array($result))
{
$user_name[] = $i['user_name'];
$user_email[] = $i['user_email'];
$this_id[] = $i['id'];
$oid[] = $i['oid'];
$uid_tmp[] = $i['uid'];
$quantity[] = $i['quantity'];
$price[] = $i['price'];
$otime[] = $i['otime'];
$status[] = $i['status'];
$aktive[] = $i['aktive'];
}
new code
while($i=mysql_fetch_array($result))
{
$user_name[] = $i[$udb_var['field']['username']];
$user_email[] = $i[$udb_var['field']['email']];
$this_id[] = $i['id'];
$oid[] = $i['oid'];
$uid_tmp[] = $i['uid'];
$quantity[] = $i['quantity'];
$price[] = $i['price'];
$otime[] = $i['otime'];
$status[] = $i['status'];
$aktive[] = $i['aktive'];
}
user_name and user_email Array were filled up with non existing datas... this could never work :P
Maybe u integrate this into the next update, because it may come up someday again in another bridged system.
-
thanks for this fix... it def will go into the next update ;)
-
Hello,
Where would I change the USD to CND funds?
Also, is there a way to add a Tax line before the Total? I have to charge GST in Canada, 6%.
Lastly is there a link to send this to Paypal.
Cheers,
Z
-
everything answered in this thread
-
Hey Stramm!
At first, great update.
One question about the Email-notification.
This is great, the User can look up his order in his Email.
But i want one more thing:
How can i add the "filename" of the picture to the email.
I found in photo_shop_checkout this line:
$out['text'].= sprintf("%10.10s\t", $item_id['pid']).sprintf("%15.15s\t", $SHOP_CONFIG[$item_id['id']]['name']).sprintf("%10.10s\t", $item_id['amount'])
.sprintf("%10.10s\t", $item_id['filename']).sprintf("%15.15s\n",$lang_photoshop['USD'].' '.$price);
This will show in the Email:
ID Typ Amount price complete
3 Photo 1 EUR 5.00
To add the "filename", i thought, to add this line will be correct:
.sprintf("%10.10s\t", $item_id['filename'])
but it wont work. What´s wrong?
EDIT:
okay, i found a way, but not final:
in photo_shop_checkout:
at first, add the title "filename":
$lang_photoshop['filename'])
a view lines among this code to show the filename of the picture:
.sprintf("%15.15s\t", $select_columns['filename'])
but in the email i see only one letter. the first letter of the filename. why?
Thx
-
http://forum.coppermine-gallery.net/index.php?topic=44417.msg211449#msg211449
Have a look at that post. It should be able to help you.
-
Great! Great! Great!
Thx a lot!
-
Stramm, for some reason I am unable to resolve your sandbox, and would like to get a copy of 1.3.5
Is there a link to download it from Coppermine's web?
Thanks!
edit: Found it along with the plugin_pack. Thanks for your time!
-
You shouldn't use the one from the plugin pack cause it's outdated. Use the one attached to the first post in this thread.
-
Very nice plugin because of the nice cart design , congrats :)
I ask you for a information about the coding :)
i would like to bypass the register form, because i have cancel the registration on my website. And so, when i put "pay with paypal buton", i would like to put in the order spec, the information the buyer put (mean the n° of the picture, and the details), and not the order number :)
It's too because don't want to show the buyer the number of order i did, and too because my webhoster doesn't allow me to send mail .... So, i know paypal service is ok (and i only send .zip files, no ships :)
Thanks :)
EDIT : and what about adding some other type (more than "CD, shipping, picture") ??
:)
-
Is there a way to change the TYPE of item being sold from photo to something else?
-
problem solved
-
Hi Stramm, as u may remember i used your shop mod in a bridged cpg_joomla system and namaged several changes to the code :P
Well at least I made some changes that may be good for the usability and maybe u take them over into one of the next versions.
Alos I dont want to hold back changes I made, because its your plugin and u should know what others do with it :P
Situation as it was:
normally u navigate in the admin area by click on the order and another click on the order details to get back to the overview of all orders.
I changes this, by removin the onclick event and set it on a real visible linktext/button:
for the order overview:
(http://www.vmm-is.de/files/cpg_shop/Liste_eingegangene_Bestellungen.jpg)
replaced:
echo <<<EOT
<tr>
<td class="alt1 smallfont" width="50px">
v<img src="$icon_type1[$k]" alt="" border="0" /><br>
p<img src="$icon_type2[$k]" alt="" border="0" /><br>
s<img src="$icon_type3[$k]" alt="" border="0" />
</td>
<td class="alt2"> <a href="profile.php?uid={$uid_tmp[$k]}">{$user_name[$k]}</a> </td>
<td class="alt1Active" width="75%">
<div>
<span style="float:right" class="smallfont">Date: {$thisdate} - {$thistime}</span>
<div style="cursor:pointer" onclick="window.location='index.php?file=photo_shop/photo_shop_admin&oid={$oid[$k]}&box={$box}';">
{$lang_photoshop_admin['noitems']}: {$quantity[$k]} <input type="button" value="details" name="details" onclick="window.location='index.php?file=photo_shop/photo_shop_admin&oid={$oid[$k]}&box={$box}';"/><br />
{$lang_photoshop_admin['volume']}: {$price[$k]}{$lang_photoshop_admin['usd']} - {$lang_photoshop_admin['incl_ship']}
</div>
</div>
<div class="smallfont">
<span style="float:right;"><a href="index.php?file=photo_shop/photo_shop_zip&oid={$oid[$k]}">{$lang_photoshop_admin['download_zip']}</a></span><br>
<span style="float:right;"><a href="mailto:{$user_email[$k]}">{$user_email[$k]}</a></span>
<span style="cursor:pointer" onclick="window.location='index.php?file=photo_shop/photo_shop_admin&oid={$oid[$k]}&box={$box}';">{$lang_photoshop_admin['order_id']}: {$oid[$k]} - {$lang_photoshop_admin['user_id']}: {$uid_tmp[$k]}</span>
</div>
</td>
<td class="alt2" align="center" style="padding:0px"><input type="checkbox" name="orders[{$oid[$k]}]" value="{$oid[$k]}" /></td>
</tr>
EOT;
width:
echo <<<EOT
<tr>
<td class="alt1 smallfont" width="50px">
v<img src="$icon_type1[$k]" alt="" border="0" /><br>
p<img src="$icon_type2[$k]" alt="" border="0" /><br>
s<img src="$icon_type3[$k]" alt="" border="0" />
</td>
<td class="alt2"> <a href="profile.php?uid={$uid_tmp[$k]}">{$user_name[$k]}</a> </td>
<td class="alt1Active" width="75%">
<div>
<span style="float:right" class="smallfont">Date: {$thisdate} - {$thistime}</span>
<div>
{$lang_photoshop_admin['noitems']}: {$quantity[$k]} (<a href="index.php?file=photo_shop/photo_shop_admin&oid={$oid[$k]}&box={$box}';" target="_self">{$lang_photoshop['details']}</a>)<br />
{$lang_photoshop_admin['volume']}: {$price[$k]}{$lang_photoshop_admin['usd']} - {$lang_photoshop_admin['incl_ship']}
</div>
</div>
<div class="smallfont">
<span style="float:right;"><a href="index.php?file=photo_shop/photo_shop_zip&oid={$oid[$k]}">{$lang_photoshop_admin['download_zip']}</a></span><br>
<span style="float:right;"><a href="mailto:{$user_email[$k]}">{$user_email[$k]}</a></span>
<span style="cursor:pointer" onclick="window.location='index.php?file=photo_shop/photo_shop_admin&oid={$oid[$k]}&box={$box}';">{$lang_photoshop_admin['order_id']}: {$oid[$k]} - {$lang_photoshop_admin['user_id']}: {$uid_tmp[$k]}</span>
</div>
</td>
<td class="alt2" align="center" style="padding:0px"><input type="checkbox" name="orders[{$oid[$k]}]" value="{$oid[$k]}" /></td>
</tr>
EOT;
for the order details (added a new back button):
(http://www.vmm-is.de/files/cpg_shop/Uebersicht_Bestelldetails.jpg)
replaced:
echo <<<EOT
<table class=" " cellpadding="0" cellspacing="0" border="0" width="100%" align="center">
<thead>
<tr>
<td class="tablef" align="right" colspan="4">
<div class="smallfont">
{$lang_photoshop_admin['SelectedOrders']}
<select name="dowhat_item" class="listbox">
<option value="mark_payed">{$lang_photoshop_admin['mark_payed']}</option>
<option value="mark_unpayed">{$lang_photoshop_admin['mark_unpayed']}</option>
<option value="mark_sent">{$lang_photoshop_admin['mark_sent']}</option>
<option value="mark_unsent">{$lang_photoshop_admin['mark_unsent']}</option>
<option value="delete_orders">{$lang_photoshop_admin['delete']}</option>
</select>
<input type="hidden" name="box" value="{$box}" />
<input type="hidden" name="oid" value="{$oid}" />
<input type="submit" class="button" value="{$lang_photoshop_admin['go']}" />
</div>
</td>
</tr>
<tr>
<td colspan="5" style="padding: 0px;">
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
{$tabs}
</tr>
</table>
</td>
</tr>
</thead>
</table>
</form>
</tr></td></table>
<table class="pms_legend" cellpadding="0" cellspacing="0" border="0" width="100%" align="center">
<tr><td><img src="{$THEME_DIR}images/s_neg.gif" border="0" alt="" /></td><td class="smallfont"> {$lang_photoshop_admin['pos']}</td></tr>
<tr><td><img src="{$THEME_DIR}images/s_pos.gif" border="0" alt="" /></td><td class="smallfont"> {$lang_photoshop_admin['neg']}</td></tr>
EOT;
with:
echo <<<EOT
<table class=" " cellpadding="0" cellspacing="0" border="0" width="100%" align="center">
<thead>
<tr>
<td class="tablef" align="right" colspan="4">
<input class="button" style="float: left;" type="button" value={$lang_photoshop['back']} onclick="window.location='index.php?file=photo_shop/photo_shop_admin&box={$box}';"/>
<div class="smallfont">
{$lang_photoshop_admin['SelectedOrders']}
<select name="dowhat_item" class="listbox">
<option value="mark_payed">{$lang_photoshop_admin['mark_payed']}</option>
<option value="mark_unpayed">{$lang_photoshop_admin['mark_unpayed']}</option>
<option value="mark_sent">{$lang_photoshop_admin['mark_sent']}</option>
<option value="mark_unsent">{$lang_photoshop_admin['mark_unsent']}</option>
<option value="delete_orders">{$lang_photoshop_admin['delete']}</option>
</select>
<input type="hidden" name="box" value="{$box}" />
<input type="hidden" name="oid" value="{$oid}" />
<input type="submit" class="button" value="{$lang_photoshop_admin['go']}" />
</div>
</td>
</tr>
<tr>
<td colspan="5" style="padding: 0px;">
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
{$tabs}
</tr>
</table>
</td>
</tr>
</thead>
</table>
</form>
</tr></td></table>
<table class="pms_legend" cellpadding="0" cellspacing="0" border="0" width="100%" align="center">
<tr><td><img src="{$THEME_DIR}images/s_neg.gif" border="0" alt="" /></td><td class="smallfont"> {$lang_photoshop_admin['pos']}</td></tr>
<tr><td><img src="{$THEME_DIR}images/s_pos.gif" border="0" alt="" /></td><td class="smallfont"> {$lang_photoshop_admin['neg']}</td></tr>
EOT;
new in $lang_photoshop for this:
'catalog' => 'Katalog',
'imagename' => 'Dateiname',
'back' => 'zurück',
'details' => 'details',
well those changes are only marginal, but I think they bring in a good improvement for the usability :P
I also added the User email adress to the mail sent to the admin and blew up the info table send in the mail to this:
Item ID Dateiname Format Anzahl Preis Katalog
1 Ina_Reimers 4x6 1 EUR 2.00 Bilder/TestVA/Testalbum/
5 Siegerehrung_E-Dressur 4x6 1 EUR 2.00 Bilder/TestVA/Testalbum/
(I dont describe it, because had been done already in another thread)
also I changed the table displayed for the users in the checkout to:
(http://www.vmm-is.de/files/cpg_shop/Aufstellung_Bestellung_vor_OK.jpg)
Maybe u think, some of those changes are worth it to be taken over into the next code review :P
-
Will I be able to sell zipped photos?.I have a oscommerce running, but I am tied of so many bugs.
-
I'm not sure what you mean with zipped photos... but try and you'll see
-
I think it means 'compressed with zip'. There is no such option right now, automatic that is: you can customize the 'add to CD' option. In CPG there is the option of downloading favourites in a zip archive, but it's not connected to the shop (yet?).
BTW Is there an option to enable some items locally (per album) and have them disabled in all the rest? Will setting the global price to 0 work that way?
-
The admin can download orders as zip...
you can disable single albums but not items in an album
-
Hi Stramm,
can i change the place of menu for "add" button and box for prices with sizes. In my gallery it stay on the right side and make white frame around the picture very big(i use 500pix pictures), when i use black background from theme. Maybe if it stay in the middle?
http://www.sportnitanci.com/webga/displayimage-3393.html
Thank you!
Kalin
-
remove unnecessary wording to make it smaller... eg there's the white heading 'Add image to shopping basket: ' on white background before the dropdown... remove it (lang/english.php) or make it smaller an you should be good
-
Thank you for support Stramm. Everything working great. Thank you again :) :) :) ;D
-
Hi Stramm
It's nearly Christmas ... and due to your excellent mod I am managing to make some money for a change. I owe you a Christmas present all the way from South Africa, so please pm me with some contact details.
Anyway (this is not bribing) I do have a question: I am busy with a website for temp tattoos. There are 4 Types, about 6 sizes, and 200 + designs per tattoo ... I need to sell them (per size) for a certain amount at certain prices. How do I do this when adding the information to the shop config ?
-
Easiest way to do that would be to add for each type all sizes.
-type 1 4x6
-type 1 5x7
-type 1 6x8
-type 1 7x9
-type 2 4x6
-type 2 5x7
-type 2 6x8
-type 2 7x9
.... that for all four types
if you look for let's say two dropdowns, one with type, the other containing the size... then this is not possible without changing a good bunch of code in nearly all files. Also db modifications would be necessary. A task that can't be done in a few minutes.
-
Hi Stramm
Thanx, yea, I figured it would be the only way, it will take me a while, but I guess ones it's done, it's done.
The only thing I don't like is that as soon as you add an item (or all items), it automatically adds it to all albums ... in what code can I change to NOT add it, but rather let me enable the albums for the prices as I wish ...
Thanx yet again for all your help.
-
to exclude certain albums from the shop functionality is a shop admin setting as well as letting certain albums override the global prices.
If you want to not exclude but rather enable the shop for certain albums you'll have to change code as you said. That code you can find in codebase.php function add_item (I think it was).
-
Stramm
If I want to enable discount for a user group called Agents ... how do I fix the code to ONLY give them discount based on number of pics they order ? This will be in functions.php.
Something like:
function calculate_discount($temp_price, $cd_counter){
$discount = '';
//variables that can be used
//$cd_counter['photo'] number of pics for print
//$cd_counter['cd'] number of pics on CD
//$temp_price[1] price for the CD
$temp_price[0]; //price for the pics
//just to demonstrate how to calculate a discount
//10% on print images if user orders more than 10 pics
if ((!USERGROUP) >= AGENTS)) {
if($cd_counter['photo'] >= 0);
$discount = 0.1 * $temp_price[0];
}
/*
//or another example... 10% if the order volume is > 100USD
if($temp_price[0] >= 100) {
$discount = 0.1 * $temp_price[0];
}
*/
return $discount;
}
-
Looks somehow made up with some syntax errors. At least a constant USERGROUP isn't defined
You could try that instead
if (USER_GROUP == 'AGENTS') {
$discount = 0.1 * $temp_price[0];
}
-
Hi Stramm
Thanx for the help ... I created two groups with different discounts .... problem is that altough the calculation is correct, the total amount seems to be wrongly calculated ...
Products: 1 Design(s) :: R 35,000.00
Agent Discount :: % :: R 5,250.00
Total: R 34,995.00
Also the percentage discount before the % sign do not show ....
Can you help please ?
Thanx in advance
-
this is how it should look
For print: 7 pics :: 14.00USD
Shipping :: 4.00USD
Discount :: % 1.40USD
Total: 16.60USD
And as you can see it works pretty good. I do not know what you've modified so I can not give you much advice.
-
I don't charge shipping ... can that be the problem ?
-
no
-
Stramm
The % gives the discount amount and not the percentage and the discount amount (e.g. 15% :: R 25.00 )
Is there a way to indicate the discount percentage ?
-
I digged around and have seen that there indeed is a problem. Will look into this tomorrow.
The percentage as you want to display it isn't known by the system. You can define the discount in the function you just modified and here you can do whatever math you like and not just using percentages (% is in my country the sign for difference, if you do not like it you can renove it - has been asked and answered before)
-
Here's the fix for your problem. It occurs when the numbers are >= 1000. The problem was the formatted output of the numbers (eg. 12,000.00 instead of 12000.00).
In plugins/pgoto_shop/include/functions.inc.php find
$discount = number_format(calculate_discount($temp_price, $cd_counter),2);
$shipping = number_format(calculate_shipping(),2);
$tot_price = number_format(($temp_price[1]+$temp_price[0]+$shipping-$discount),2);
$cd_price = number_format($temp_price[1],2);
$photo_price = number_format($temp_price[0],2);
and replace with
$discount_calc = calculate_discount($temp_price, $cd_counter);
$shipping_calc = calculate_shipping();
$discount = number_format(($discount_calc),2);
$shipping = number_format(($shipping_calc),2);
$tot_price = number_format(($temp_price[1]+$temp_price[0]+$shipping_calc-$discount_calc),2);
$cd_price = number_format($temp_price[1],2);
$photo_price = number_format($temp_price[0],2);
edit: added number format for discount and shipping as noted by JohannM 2 posts below
-
Hi Stramm
Seems to me the calculations is correct now, but the discount amount is not with decimal places:
Products: 2 Design(s) :: R 57,500.00
Discount :: % :: R 14,375
Total: R 43,125.00
Is there a way to have fixed digits (e.g. 9 number format) ?
-
should be:
$discount_calc = calculate_discount($temp_price, $cd_counter);
$shipping_calc = calculate_shipping();
$discount = number_format(($discount_calc),2);
$shipping = number_format(($shipping_calc),2);
$tot_price = number_format(($temp_price[1]+$temp_price[0]+$shipping_calc-$discount_calc),2);
$cd_price = number_format($temp_price[1],2);
$photo_price = number_format($temp_price[0],2);
That is fixed now ...
Just wonder about fixed length of digits ...
-
http://php.net/manual/en/function.number-format.php
http://php.net/manual/en/function.money-format.php
-
Stramm
Just a question ... if you add an item to the shopping basket, for a brief moment the page refresh with only the footer (Powered by Coppermine) etc.
Is there a way to add a line there for e.g. "Adding product to basket" ? And where in what file (line) can I add this ?
Check out my new site: http://www.temp-tattoos.co.za/agents/
I'm still doing some changes ...
-
yah, I always wanted to add this... started to code it but never finished. Somehow I had implemented it but, hmmm... I didn't like it. The remainings you'll come across when I show you what to do.
plugins/photo_shop/codebase.php find
photoshop_refresh($referer);
replace with
photoshop_refresh($referer, $lang_photoshop['added']);
plugins/photo_shop/include/functions.inc.php
replace the already existing function photoshop_refresh with this new one
function photoshop_refresh($redirect, $txt='') {
global $lang_info;
pageheader($lang_info, "<META http-equiv=\"refresh\" content=\"0;url={$redirect}\">");
if($txt !='') {
msg_box ($txt, $txt);
}
pagefooter();
ob_end_flush();
exit;
}
-
Hi Stramm
I see what you mean, altough I like it.
But I would like to change the actual message you see inside the table (e.g. Item added to shopping basket) and the table/page heading something like "REFRESING" ...
I played a bit with the code with no luck ....
-
in the lang file... added
change that
-
Hi Stramm
I am full of questions (one per thread):
How can I include a function and button in the admin page to resend an specific order (email) to the specific user and admin ?
Thanx in advance
-
I am full of questions (one per thread):
Then why do you ask your questions in this very thread? The policy says "one question per thread". It doesn't say "one question per posting". Asking for new features in the announcement thread is not a bright idea.
-
Sorry then
I supposed I thought this question is related to the Shopping cart .... where should I post the question then ?
Thanx
-
Request new feature on the plugin board (http://forum.coppermine-gallery.net/index.php?board=53.0), with reference to the announcement thread of the plugin that you want to see improved. Of course there's no guarantee that someone is going to look into your request.
-
Dear Stramm,
thanks for this great plugin. I have just installed it and would like to ask you about some things...
1. Is there any possibility to set up just - Print order - option? I want just, that my users orders print from my photos in different sizes and after I did the print send it to the buyer. How can I set up a - Order Print - style photo shop?
Something like this... ist this the Photo Shop plugin or others?
[Edit GauGau] Hotlinked image replaced with attachment [/Edit]
2. I wanted to upgrade the language file to my language but there is a problem, my language has some special characters like - é, ű, ő, í - and the words arn't uppers correctly. How can I include the special characters for my language?
Thanks for your answer.
Regards,
Matt
-
save the lang file as utf-8
in the shop's config remove the entries for 'CD'
-
hello all, I'm really having a very hard time aading shopping cart to my gallery, can some one help me. nothing seem to be going right. rather than posting here can you e-mail me better. here is my e-mail nycfotografo@yahoo.com. i really will love to have this working, i can also call anyone in the usa fi you rather.
check my gallery http://cprphotography.com-h.com/album/displayimage.php?album=2&pos=3.
-
We do not give support by email, for that we have the forum.
As far as I can see the shopping cart seems to work fine.
-
Hi Stramm, this is a great plugin!
Well i need some modifications, but i am not sure where (and what :P) to change in the code to make them, could you help me?
I have a gallery of art, and i am using CPG to show the pictures and maybe sell anyone. :)
I have diferents albums to diferent category of art in cpg (orders by size), but this pixtures can be selled only one time. And also, the picture has ther size, and it is impossible to change it.
So, i need two things, i am not sure if it is difficult or not, but i will try to make them.
- First of one, i need that when anyone come into an album with a size they could only select that size to buy, not all the prices list.I mean, I have an album in cpg with all the pixtures 35x45, i want that the shop plugin only shows that option to buy in that albums items, not the 4x7 option. I hope you understand me. I think this cannot be so dificult as you have diferente prices for albums... just remove items for them...
- Second i need is more dificult. I need a posibiliy to select what pictures can be selled and other that cannot be, because when i sell a picture i will keep it on the gallery, but i cannot sell it again. :)
I hope you could help me to edit the code. Thank you very much for the plugin.
I have translate into spanish the lang file, but changing some words to adapt to my web. It is attached on this post also.
-
Your desired modification to show only one specific picture size for a certain album surly is possible. You'll have to add another field to the shops config table, then modify the config/ admin backend to be able to mark one item per album (save in the above created field).
Then modify the add-item function to only show the above marked items.
For that you need to add a field to the pictures table cause the shop is not prepared for 'per item' usage but for per 'album' usage. That field you need to check again in the add_image function if set, if set you don't display the shop's dropdown. If you sell an item, you mark it as sold in the admin... here you need to add code that add's to the pictures table in the above mentioned field.
-
Your desired modification to show only one specific picture size for a certain album surly is possible. You'll have to add another field to the shops config table, then modify the config/ admin backend to be able to mark one item per album (save in the above created field).
Then modify the add-item function to only show the above marked items.
For that you need to add a field to the pictures table cause the shop is not prepared for 'per item' usage but for per 'album' usage. That field you need to check again in the add_image function if set, if set you don't display the shop's dropdown. If you sell an item, you mark it as sold in the admin... here you need to add code that add's to the pictures table in the above mentioned field.
Sound easy :P
I will come back if stop on something im not sure how to solve. :D
Thanks!
-
Hi.
I managed to do the things in a easy way.
For the first thing, i will use only a generic type of price, as i have my pictures in diferents albums, all with the same price, so editing the price of each album seem easy.
Also, i will use one of the custom profile data of each pictures to mark them as sold, and thsi way i did not touch the pictures database. :) I will onli need to add code to the add_image function. :)
With that solution i need to make a custom price list, because each album has diferent prices.
It is possible to make an option to the plugin to add a custom price list?
Thanks
-
Hello Stramm,
Thank you for writting and supporting this plug-in for all of us non coders out here. It really works well and is quite versable. So far I've been able to get it to do every thing I need to to. You really should have a way for us to send you donations to help offset you hard work. I do have some layout questions that I'll post in the plug-in forums, but wanted to say thank you in this thread!
-
Is there a possibility that customer won't register due checkout, but only fill in there name and e-mailadres (required)?
greetz thijs
-
you'd need to modify a bunch of code in checkout.php... but why, change your registration form to only show name, email and nick. Then that's basically what you require.
-
Do you mean the registration form of joomla or photo_shop?
Because I don't want any users on my site. it's a free public site and when the order i don't want messages like: username already exist.
thanks for your help!
-
If you're bridged, then your bridge apps registration form should made use of. To save the user data is a necessary process. Creating just another user table while one already exists is redundant. Therfore the most logic thing to do
id to use the existing structure. If you do not want your users to be able to chose a username you probably can set it the same as the user id (a unique number). Means additional coding.
-
I have tried to install the plugin into my Coppermine 1.4.14 gallery bridged with the Mehdi Bridge (http://www.mehdiplugins.com/misc/index.htm).
After installing I get the message "critical error retrieving data from the database and my gallery isn't working anymore. Can someone help me to solve this problem? I use the latest shopping card version.
Thanks for your reply.
Regards,
Ron
-
Ron, I"m no coder, but I use Joomla and that bridge so maybe I can help you out. Please give a little more details. Was your Gallery and Joomla sites up and running by them selves before bridging them? Did the bridging seem to go alright when you when through the steps?
-
Hi Stramm.
Thanx for the plugin!
My gallery is only my own private gallery. I don't have any users and disabled "Allow new user registrations" in CPG config. And so i need some problems solutions.
- The best way is to have a simple checkout form without a new users registration in gallery (only name, e-mail, ... for sending pictures). Is it possible to make?
- In case of a new user registration (as is), is it possible to disable auto login user/customer after filling registration form and checkout?
- I have made a new user group "customers" without any rights, but after checkout registration procedure all new users membership is "Registered". Where can i change it?
Can you help me?
Thanx in advance.
-
Hello Stramm,
Thank you for this wondering tweak to Coppermine.
Im not very handy with php so thats why I like Copper + your tweak very much.
Now my question is: Where can I change the sizes and price?
Its allready in EUR, but if I edit the basic.sql file (so change the size and price) nothing happends after I uploaded the new edits.
Maybe I do something wrong, or do I have to change more files?
Thank you!
-
Changing EUR has been asked and answered within this thread... done modifying the lang file.
The prices and sizes you can edit in the shops config (see the first post in this thread).
-
ohhhh, thanks I just thought I had to make the edits in notepad but its easy to do online.
many thanks!
-
Ron, I"m no coder, but I use Joomla and that bridge so maybe I can help you out. Please give a little more details. Was your Gallery and Joomla sites up and running by them selves before bridging them? Did the bridging seem to go alright when you when through the steps?
Thanks for your reply. Somehow the tables were installed into the wrong database (the database of Joomla instead of the Coppermine database). So, problem solved. ;D
-
Hi Stramm.
Thanx for the plugin!
My gallery is only my own private gallery. I don't have any users and disabled "Allow new user registrations" in CPG config. And so i need some problems solutions.
- The best way is to have a simple checkout form without a new users registration in gallery (only name, e-mail, ... for sending pictures). Is it possible to make?
- In case of a new user registration (as is), is it possible to disable auto login user/customer after filling registration form and checkout?
- I have made a new user group "customers" without any rights, but after checkout registration procedure all new users membership is "Registered". Where can i change it?
Can you help me?
Thanx in advance.
Hi vfx,
You can configure the user rights in Coppermine. At the user groups you can set at the "registered group" the "Public albums upload" and the "Personal gallery" allowed to "No".
Good luck,
Ron
-
Ok I did a preview order to myself but once I want to confirm I have this message:
"Bedankt voor uw bestelling.
Een email ter bevestiging is naar u verzonden!
Zodra uw betaling is ontvangen wordt uw bestelling afgehandeld!
--->This is just a demo cart, do not process any payment. Do not paypal me any funds!!!!<---"
Aspecially the last line... what do you mean with this and how do I get it out?
-
It's exactly what it say... I'm a demo cart, do not paypal me funds as I won't send photos back in return...
To remove that line edit the lang file (as usual)
-
Coppermine 1.4.12 has an include/archive.php with different function names and class name than what is used in photo_shop_zip.php. Class zipfile -> zip_file, functions: addfiles -> add_files, filedownload -> download_file. After I made these changes in photo_shop_zip.php and clicked on "Download zip" in the Shop tab of the admin, I just got a blank white page.
????
Also, (and less important) when you include the url to the orders page in the "You got a new order" email, it does not work unless you are already logged in.
-
Thank you for an amazing add-on to my gallery! I can only hope I get some business as the car show season starts up soon.
-
Coppermine 1.4.12 has an include/archive.php with different function names and class name than what is used in photo_shop_zip.php. Class zipfile -> zip_file, functions: addfiles -> add_files, filedownload -> download_file.
This has been changed in CPG ~ 1.4.10... needs correction
Also, (and less important) when you include the url to the orders page in the "You got a new order" email, it does not work unless you are already logged in.
Yes, only the logged in admin should be able to view all orders. You get the notification. If logged in, the link works OK and you'll see the admin. If you're not logged in, then of course the system sees you as guest and you do not have permission to view admin pages. In that case you get a permission denied error.
-
Coppermine 1.4.12 has an include/archive.php with different function names and class name than what is used in photo_shop_zip.php. Class zipfile -> zip_file, functions: addfiles -> add_files, filedownload -> download_file. After I made these changes in photo_shop_zip.php and clicked on "Download zip" in the Shop tab of the admin, I just got a blank white page.
TO FIX: -TESTED AND WORKS!
Remove the last six lines of code in photo_shop_zip.php from "$flags['storepath'] = 0;" to: "$zip->download_file(...".
Add the following (notice the new trailing 's' for storepaths):
$flags['storepaths'] = 0;
$flags['basedir'] = "./{$CONFIG['fullpath']}";
$flags['inmemory'] = 1;
$flags['recurse'] = 0;
$zip = new zip_file(photoshop_pics_oid_'.$_REQUEST['oid'].'.zip');
$zip->set_options($flags);
$zip->add_files($filelist);
$zip->create_archive();
ob_end_clean();
$zip->download_file();
-
codebase.php, photoshop_add_item() will cause a database critical error when you perform any search (issue : query includes 'WHERE aid=search') Ad the following before the first line of code to fix:
if( strcmp($pic_data['aid'], "search") == 0)
{
return $pic_data;
}
-
???
I installed your plugin and my site is not accessable anymore!!
www.artefatta.biz
Sorry false allarm ::) it taked some minutes, but now it works.
Question:
As there is a gallery of real art, all pieces are unique.
Could my users put the price in one of user fields and your script grab it from there?
-
???
I installed your plugin and my site is not accessable anymore!!
www.artefatta.biz
I tested it out and it seems to be working fine on my side.
-
???
I installed your plugin and my site is not accessable anymore!!
www.artefatta.biz
Sorry false allarm ::) it taked some minutes, but now it works.
Question:
As there is a gallery of real art, all pieces are unique.
Could my users put the price in one of user fields and your script grab it from there?
I'd say that's probably possible. It however would mean recoding a good bunch of the plugin.
-
I'd say that's probably possible. It however would mean recoding a good bunch of the plugin.
Oh, I guess that means you should write a new plugin for such a possibility?
May be there is already one that fits my needs and I don't know it because I'm a newbie??
-
I do not know of a plugin/ mod that's exactly what you're looking for.
This plugin needs to be rewritten (some parts of it), to do what you want. That's not trivial and means a lot of work.
-
I installed shopping cart recently...
anyway whenever a new item is added to the cart (clicking on add button), the browser is not redirecting to the last page, it is working with a classic theme, im using a custom made theme, did i miss something... please help me, if i have posted this thread in a wrong section, excuse for the same.
In case the above issue is mentioned already in the post, then please let me know!!!
here is the link: http://www.adityasphotos.com
-
hmmm, works just fine for me
-
Hi Stramm,
My photoshop doesn't show correct total price in 'myorders'. At checkout stage, the total price still ok but when it goes to myorders; Shipping & discount excluded from the total price calculation.
As you can see in the attachments, the total price at cart and checkout stage is RM7.45. But it was checked out and I open myorders page it shows total price as RM0.45 only (excluded shipping cost of RM7.00). What went wrong? I didn't make any changes on the coding so far.
Appreciate your kind help ;)
-
Which version of the cart do you use?
-
Which version of the cart do you use?
I'm using photo shop ver 1.3.5 and CPG ver 1.4.16
-
I've a ver 1.3.6 ready for some weeks now. Just forgotten to post it. If I'm not totally wrong, it fixes that.
Will upload it the next days.
-
Thx Stram!! You are absolutely my life saver ;)
-
New (maintenance) version (1.3.6 uploaded 3/25/2008)
-
Hi Stramm,
Looks like we have another prob. Anyone can see ur items in cart (not yet checkout). How can we restrict this to let the photos in cart viewable by the owner only? Also, other people can checkout whatever in the cart.
You can try to simulate it by put some photos in cart then logout. After that try login using other acc and you'll see there's photos in ur cart even though it's ur first time login. I've checked this in ver 1.3.6 and thing is still there.
-
That's not a problem... but expected behaviour
All items in the cart aren't stored in the database but only in a session and cookie. The cookie is independent if you're logged in or not. It's computer based. You as owner of your local PC will be recognized.
Advantage is, (main reason why you do it this way) that a user can browse your gallery as guest. When he checks out a login is required. Doing it your way, all items in the basket would be lost and the user needs to go shopping again.
Verify this with clearing your cookies and you'll see, the basket is empty. Also try to login from another computer.
-
I am 70 years old and I guess a little stupid? But where in the Photo Shop plugin is the file that contains the prices? I have it working and linking to my paypal account instead of the test account,but I can't seem to find the file with prices.....
naturephotographbybyhwilliam.com/newgallery/
-
prices are stored in the MySQL database. Here again the relevant part from the first post of this thread
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.
-
Thanks for the quick response - that solved my problems - Is there a way to put a space in the drop down menu between USD and the price? Instead of USD40.00, I'd like 40.00 USD - No big deal..your plugin is the answer to a year's dream!
-
for that you'd need to modify codebase.php a little bit
find
$html.="<option value=\"{$value['id']}\">{$value['name']} - {$lang_photoshop['USD']}{$value['price']}</option>";
replace with
$html.="<option value=\"{$value['id']}\">{$value['name']} - {$value['price']} {$lang_photoshop['USD']}</option>";
-
Used to play around with that kind of thing before. Interesting and gud experience lol..
for that you'd need to modify codebase.php a little bit
find
$html.="<option value=\"{$value['id']}\">{$value['name']} - {$lang_photoshop['USD']}{$value['price']}</option>";
replace with
$html.="<option value=\"{$value['id']}\">{$value['name']} - {$value['price']} {$lang_photoshop['USD']}</option>";
-
Used to play around with that kind of thing before. Interesting and gud experience lol..
Thanks so much....works like a charm
-
I would like to see a 'Add All' option to this plugin. This would allow visitors to add all the photos in an album to a CD.
What I really need is a plugin that will allow a visitor to purchase an entire album. An 'Add Album to Cart' button would be added next to the album thumbnail. When the visitor checkouts though PayPal they would receive a secure link to the .rar or .zip file(s) to download. Do you have any interest in creating a plugin like this?
Best Regards,
Gregor Wylie
-
I know that images can be selected and placed in a cart which is then zipped for download. Is it possible after checkout to bypass the payment process and send the zipped file to the registered users email address? We are not charging for images and I cannot see a way to bypass the "paypal" process.
Regards
-
I would like to see a 'Add All' option to this plugin. This would allow visitors to add all the photos in an album to a CD.
What I really need is a plugin that will allow a visitor to purchase an entire album. An 'Add Album to Cart' button would be added next to the album thumbnail. When the visitor checkouts though PayPal they would receive a secure link to the .rar or .zip file(s) to download. Do you have any interest in creating a plugin like this?
Best Regards,
Gregor Wylie
actually I have slightly other plans for improving this plugin
- Paypal IPN support
- cd, print or downloadable items
- if download, a pwd protected folder will be created and the password mailed to the user.
- size of the 'downloadable' items can be set (eg. 640px, 800px, 2048px), a resized copy will be put into the download folder
- a zip will be created in addition
- support for free items
- config backend... getting rid of gateway.inc.php
- currency can be set in config
when or if I really will go to publish it here... I can't say atm
-
I know that images can be selected and placed in a cart which is then zipped for download. Is it possible after checkout to bypass the payment process and send the zipped file to the registered users email address? We are not charging for images and I cannot see a way to bypass the "paypal" process.
Regards
please read my last post
-
Just wanted to thank you for this awesome plugin Stramm. Also can I suggest a "coupon" discount inclusion in the next version, if that's at all possible?
-
Critical error
There was an error while processing a database query
installed photo shop 1.3.6
on a bridged 1.4.17 with the modpak
used plugin manager, clicked install button, next page showed changes made, clicked ok, got error
site; www.hot-rides.net/coppermine/
enabled debugging;
While executing query "SELECT * FROM cpg_shop_config ORDER BY priority ASC" on 0
mySQL error:
need help fast!!!
-
That's not much of MySQL tells about the error... so blind guessing
remove the ASC
plugins dir... include/init.inc.php
find
$results = cpg_db_query("SELECT * FROM {$CONFIG['TABLE_SHOP_CONFIG']} ORDER BY priority ASC");
replace with
$results = cpg_db_query("SELECT * FROM {$CONFIG['TABLE_SHOP_CONFIG']} ORDER BY 'priority'");
-
tried that, no effect
moved the troubleshooting here to not clogged up this already enormus thread
http://forum.coppermine-gallery.net/index.php/topic,51906.0.html
-
Just installed Coppermine and Photoshop plug in....followed instructions for installation of photoshop. when I go to checkout all I get is the header "checkout" and nothing else. updated database...any ideas?
-
No, maybe when I can see the site...
-
Duh.....when you get old you get stupid....the whole thing was there when I scrolled to the bottom......(I'm having a problem that I guess I need to go to another thread, but on Firefox the site looks totally different and none of the themes seem to work, however on Explorer everything is as it should be) sorry...but, question.is there a paypal addition to this plugin? I really need to have clients to be able to pay that way..
-
a basic implementation is supported, read the very first post of this thread for more info
-
Weird question that may have been asked before. I have two instances of coppermine running (not the best way to do this but it works for me). What I have is one photo gallery with the cart and a gallery for merchandise with the cart.
Everything works fine except when you add something to one cart, it tries to add it to the other but gives a database error when you view either cart after viewing both galleries. Confusing I know and I thought maybe I just need to change cookie names but that didn't seem to fix it.
Thanks for any help and thanks again for the great add-on.
-
I see the files in the folders, but are there instructions somewhere on installing the paypal portion of the plug in?
-
Weird question that may have been asked before. I have two instances of coppermine running (not the best way to do this but it works for me). What I have is one photo gallery with the cart and a gallery for merchandise with the cart.
Everything works fine except when you add something to one cart, it tries to add it to the other but gives a database error when you view either cart after viewing both galleries. Confusing I know and I thought maybe I just need to change cookie names but that didn't seem to fix it.
Thanks for any help and thanks again for the great add-on.
Db error cause the cookie stored info about pics that one gallery has but not the other. Without haveing tested I suggest (as you've already done) changing the cookies on both galleries to be different, then clear cookies and retry.
-
I tried that, even with different cookie names it still does the same thing
does the plugin create its own cookie that maybe I can change the name to?
-
Hi Stramm,
I'm just wondering, and I'm guessing it's been asked before but the search isn't showing anything that answers my question, but when I mark an order as paid or sent is anything meant to happen, because currently it's not? :-[
Thanks for any help, and apologies if I'm being thick.
Sy
-
yes and no... this was introduced to be able to use eg. paypal IPN or some CC gateways that send back payment info. IPN marks the item as paid, you know you can send them (or as in some custom work, create a download folder and copy resized versions of the original image there).
On my demo site you can eg. 'buy' a 'free download'. The free download is without watermark in a smaller resolution. Gets placed into your download folder and you get an email with your password. And of course it's getting marked paid, if the download image's getting cretaed, it's marked paid.
As it is now, it's a reminder for you. Nothing less, nothing more.
-
Hi,
Thanks for getting back to me and for the info. A manual reminder is fine for me...now I just need something to remind me to set the manual reminder PMSL ;).
Thanks again,
Sy
-
Stramm's Shopping Cart is a beautiful mod - thanks!
Finishing up on a few trial runs with PayPal as the payment processor.
Discovered two things:
1) how to fix the discount percentage that shows up as 10.5% when the coding calls for 10%
includes/functions.inc.php
//another example... 10% if the order volume is > 100USD
if($temp_price[0] >= 100) {
$discount = 0.1 * $temp_price[0];
}
2) PayPal does not show the discount when the order is processed.
Any ideas?
-
PayPal again changed things. This time they do not allow 'handling_cart' to have a negative value (I used that as a bundeled value for discount and shipping). Means if you only use a discount, it's < 0 and therefore invalid. Checking the paypal forums it seems they plan to introduce discounts this year... when... no clue.
As a workaround it may be possible to introduce a 'discount item', no global cart var, but a true item. Maybe it's possible to give that a negative value. If that all isn't working, then the only way is to step back a shop version and use only a 'one total price' paypal checkout.
-
Thank you very much for the thorough explanation.
If I had the skills to code a solution - I would. But alas I but a newbie.
-
So I did try to send negative values to paypal as an item... server doesn't accept this, as one of the paypal guys said in the forums http://www.paypaldeveloper.com/pdn/board/message?board.id=basicpayments&thread.id=1688&view=by_date_ascending&page=1
At the moment it's not possible to use discounts together with paypal. Except you calculate them before sending the data to paypal. Means, you discount each item and send that data... there may occur a rounding error so the total may differ (~ 1-2 cent). That's cause the shop discounts the total and not each item.
Or you don't send data of each item to paypal but just the discounted total.
Still paypal won't show the discount and not the initial invoice. If the paypal guys add that feature (as said in the thread) I'm going to implement it again.
-
Has anyone figured how to add a third category to "prints" and "cd". I'd like to also give users the chance to buy the photo's from a gift item category in the drop down menu.
-
Rename the categories to 'cds' and 'other'
-
I understand the solution - but it would be helpful to have four categories (photos, cds, gifts, photo books).
The new gift category would be like photo category - single item transactions.
The new photo books category would be like cd category - multiple pictures within transaction.
So I was hoping for a little direction on copy/change/paste coding and mysql.
Others probably would benefit from this too.
Happy to help if any is needed
-
Yes, difficult. And imo not necessary. That's the only cart I know having two categories. The only plan I had was a config option to disable the cd cart.
-
Looks like I was updating my post - when you made yours.
ok - understand, it's difficult.
maybe I'll take a stab at it... stand back for safety!
-
I've been replacing the CD option for customer to PhotoBooks.
All has worked except for the checkout page that shows the items as "CD" rather than PhotoBook.
For some reason - I just can't find where to change that. Can you point me to it?
-
Make a screenshot and mark what you mean
-
thanks for taking a look Stramm. you'll see the term "photobooks" being used where CD had been - so that customers can load multiple images to buy a photobook.
But I need to replace the term "CD" that populates the "Type" field on the checkout page
-
Stramm - can you see the screen shot?
-
yes, can see it...
in photo_shop_checkout.php find
<td>{$item_id['id']}</td>
and replace {$item_id['id']} with the text you need (photobooks)
-
yup - thanks Stramm!
-
Hello Stramm
I agree with everybody, you made a tasty and usefull plug-in :)
I installed latest version 1.3.6 and made some tests.
Using the Paypal checkout, I had a mistake in the total amount of the order transferred to paypal.
There was a cd of 25 pictures in the purchases, and what has been transferred to paypal with the per item list, is the price of the CD attached to each picture of it. The CD is 50€, so it made a total amount for paypal of 25*50€ = 1250€ instead of 50€ !
Guess there is something to change in the checkout process ???
Cheers
Olivier
-
Hi Stramm
Thanx to u my site is cooking with some orders ( www.youth-sport-fotos.com )
Just one question: In admin mode, we have to options: 1) Current Pending Orders and 2) Archived Orders.
How can I add "cancelled" or "deleted" orders ?
Thanx 'n million
Jo
-
There's no status id for canceled introduced atm. That needs to be coded.
What do you mean with 'deleted' orders? If you delete orders from within the admin panel, they get marked 'deleted' and just rendered invisible. With a tool like phpmyadmin you still can recover these orders.
It's a lot of work I'm afraid... search the code for 'box' and you'll find everything you'll have to change.
-
Hello Stramm,
I found out how to correct the price calculation transferred to paypal when a Cd is in the list of items.
In the photo_shop_checkout, where there is the paypal code, I just put a switch that changes when the first cd item is encountered. So only the price of the first cd item is taken into account.
here is what it looks like...
//pay with paypal
if ($CONFIG['photo_shop_paypal_enable']) {
$handling = $shipping_price-$discount;
$paypal_items = "";
$counter = 0;
$cdswitch = 0;
foreach ($shop_array as $key => $item_id) {
$pid = $item_id['pid'];
$amount = $item_id['amount'];
$counter++;
if ($item_id['id']=="CD") {
$size = "CD";
if ($cdswitch=="0") {
$price = $cd_price[1];
$cdswitch = 1;
} else {
$price = 0;
}
} else {
$size = $SHOP_CONFIG[$item_id['id']]['name'];
$price = $SHOP_CONFIG[$item_id['id']]['price'];
cheers
-
Hello again Stramm
Another point I cannot solve... on the shipping calculation.
I do not use any item ship, instead I have a per item shipping cost. Some at 0 and some with something. It concerns CD and prints.
For ie : print as a shipping cost of 1, CD as a shipping cost of 4
in the shopping cart, if I have only pictures on cd, the shipping cost of the CD (here 4) is never taken into account.
If I have a mix of prints and CD, only the shipping cost of the print is taken into account and appears well.
I cannot find out why the cd shipping cost is never taken into acocunt. I tried to look for some hours to the code, but could not find the trick.
Do you have a clue that may help me ?
Thanks
-
yes, initially this feature wa meant for print items to be able to overwrite the 'global' shipping price. Means CD always have the global shipping and items such as framed, printed images or maybe cups can have a higher shipping price.
To extend the functionality you'll need to modify plugins/photo_shop/include/init.inc.php
replace
while ($row = mysql_fetch_array($results)) {
if ($row['type']=='ship') {
$SHOP_CONFIG['ship'] = $row['price'];
}
$SHOP_CONFIG[$row['id']] = $row;
}
with
while ($row = mysql_fetch_array($results)) {
if ($row['type']=='ship') {
$SHOP_CONFIG['ship'] = $row['price'];
}
elseif ($row['type']=='cd') {
$cd_shipping = max($cd_shipping, $row['ship']);
}
$SHOP_CONFIG[$row['id']] = $row;
}
$SHOP_CONFIG['CD']['ship'] = $cd_shipping;
This grabs the cd shipping from the db and makes it available in the function calculate_shipping() (if you assign different shipping values it'll take the highest)
I've not really tested this. Ther may be problems ...
-
Hello Stramm,
I found out how to correct the price calculation transferred to paypal when a Cd is in the list of items.
Thanks, good work
-
Hello Stramm
Thanks a lot for your answer about the shipping calculation, it did help :)
Just tested, and now it behaves just as I wanted :) :) :)
Really great !
Cheers
Olivier
-
Hallo to all readers ;)
I'm using the shop and have a little esthetic question, maby someone can help.
I'm using fotogallery theme, wich hase a column on left side, this makes that last step of checkout is unproperly repersented:
If you take a look at the attached image you will understand.
(http://checkout.jpg)
I dont know where I can solve this.
If someone point's me in right direction will be great! :D
-
Easiest way to do that would be to add for each type all sizes.
-type 1 4x6
-type 1 5x7
-type 1 6x8
-type 1 7x9
-type 2 4x6
-type 2 5x7
-type 2 6x8
-type 2 7x9
.... that for all four types
if you look for let's say two dropdowns, one with type, the other containing the size... then this is not possible without changing a good bunch of code in nearly all files. Also db modifications would be necessary. A task that can't be done in a few minutes.
You insert this into Shop > Config area correct? Where by default your only three types are Photo, CD, and Shipping? How would you add another type? I've been looking through the codes and it seems like the types are pretty hardcoded into the plugin, or could it be as simple as creating another row in the MySQL table (_shop_config) and forcing the type to be the name you want?
Basically what I am aiming for is to have different "size sets" for different aspect ratios of photos I want to sell (2:3, 1:1, etc.). If this isn't available "out of the box" or something close to it, then I might be able to handle the additional coding if I can be pointed in the general direction. (In retrospect as I proof-read this post, I think I am coming to the realization that this will indeed involve a bit of adding onto the current shopping cart plugin).
EDIT:
Also I was wondering about the pages where PayPal redirects your customers after ordering. From gateway.inc.php:
//PayPal return URL, leave empty if you do not want to make use of the return URL
$CONFIG['photo_shop_paypal_return_url'] = '';
//PayPal cancel return URL, leave empty if you do not want to make use of the cancel return URL
$CONFIG['photo_shop_paypal_cancel_return_url'] = '';
Are you planning on writing a page for these return URLs for the next version? I feel I may need something like this for my work, and am considering writing one up. I have read through PayPal's documentation about integrating and I don't quite understand everything, but this would be a good chance for me to learn :D Under the current setup, does this plugin simply use the "Individual items to PayPal" option: https://www.paypal.com/IntegrationCenter/ic_standard_home.html#individual
And what types of security does the plugin integrate? (https://www.paypal.com/IntegrationCenter/ic_button-encryption.html) I have seen several mentions of payPal's IPN system, but this isn't active in the plug-in yet, correct?
But then in order to implement the IPN all you would have to do is have the return URL a validation script that checks the values PayPal sends, then returns it with the confirmation while posting a message to your guest that everything worked right... I'll look into it ;)
(Oh, and you also have to send a 200 OK to paypal. Can PHP handle that on its own? TO THE MANUAL!)
-
Hi all,
I have a smal problem with this great shopping cart plugin, when I use it combined with the following Mod:
- Anti-Copy Mod : Complete Image Overlay, Hide Image Links, and other features...
- http://forum.coppermine-gallery.net/index.php/topic,45828.0.html (http://forum.coppermine-gallery.net/index.php/topic,45828.0.html)
Error description:
- The thumb is not longer shown in the shopping cart.
My Testgallery could be found here:
- http://www.volleyball.lu/gallery (http://www.volleyball.lu/gallery)
Can someone give me a hint? Thanks a lot in advance.
Regards, Francis
-
I just wanted to post about a possible display bug with the latest version linked on the first post (1.3.6). On my checkout page the total section was not right justified, and in the code it appeared that the table that contains most of the main content ended early. On line 50 of photo_shop_checkout.php there is an endtable() that I commented out and it fixed the problem.
//start html output
pageheader($lang_photoshop['checkout']);
starttable('100%', $lang_photoshop['checkout'], 1);
//endtable();
//start all the if else
-
I installed this on a client's website (http://www.cheastudio.com/client_proofs/index.php)
and when I go into the config and, for example, delete a line like the 4x6 photo, and hit "save new configuration"
it takes me to this page:
http://www.amywilliamsdesign.com/shoperror.jpg [Edit GauGau] Replaced hotlinked image with attachment [/Edit]
No content, just the top and bottom section is about the easiest way I can explain it.
When I click on shop, then config again, the change it made, but this kinda makes it a pain in the butt to work with.
What's going on? Thanks :)
-
Maybe the browser or the OS blocks meta refreshes??
-
Maybe the browser or the OS blocks meta refreshes??
I have another one set up on another client's website (fullofgracephotography.com) and don't have this problem.
-
issue with the theme?
-
It must be, it works when I use a default theme, but I can't for the life of me figure out what the problem is (got a migraine though, so I should step away and come back). Any possible ideas?
-
Maybe it's a good idea to attach your theme to your next post (zip).
-
Sorry I didn't come back, it was my template not the theme. I fixed it. I have a new question, my client wants to offer free shipping if picked up at her studio or a shipping fee if the package is sent directly to the client. Is this possible?
-
Is it possible to place products from different providers?
-
you can place whatever products you want
-
http://ceconn.com/photo_gallery
I thought I was doing great and then this happened. Following your instructions, I added {USER_NAME}
{SITE_ID}
{ORDER_ID}
{PRICE}
{ADMIN}
in the lang/english.pnp file. Now I get this error when signing in:
Parse error: syntax error, unexpected '{', expecting ')' in /home/cecon46/public_html/photo_gallery/lang/english.php on line 1504
Also, the saved english.php file now reads in part: $lang_photoshop_email_admin = <<<EOT
Hello {ADMIN},
{USER_NAME} just made an order on your site {SITE_NAME}. The id of that order is {ORDER_ID} and the total value {PRICE}.
<a href="{LINK}index.php?file=photo_shop/photo_shop_admin">Click to go to the order manager</a>
This looks right to me but what do I know? Now I can't even sign in to my site.
What did I do wrong?
-
Attach the file to your next post and we can tell you.
-
use the lang file in the plugins directory... plugins/photo_shop/lang/english.php and not lang/english.php
-
my url (http://ceconn.com:2082/frontend/x3/filemanager/editit.html?file=english.php&fileop=&dir=%2Fhome%2Fcecon46%2Fpublic_html%2Fphoto_gallery%2Fplugins%2Fphoto_shop%2Flang&dirop=&charset=&__cpanel__temp__charset__=iso-8859-1&baseurl=&basedir=)
Thank you for your quick response.
I also moved the files as per instructions "Finally move the images from the archive (folder images_to_move) to your themes images directory"
Just to let you know, I have the latest plugin and the latest Coppermine.
I'm not sure that link worked, so here is the file:
<?php
/**************************************************
CPG Photo Shop Plugin for Coppermine Photo Gallery
*************************************************
Copyright (c) 2006 Thomas Lange <stramm@gmx.net>
*************************************************
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
*************************************************
Coppermine version: 1.4.16
Photo Shop version: 1.3.6
$Revision: 1.0 $
$Author: stramm $
***************************************************/
if (!defined('IN_COPPERMINE'))
{
die('Not in Coppermine...');
}
if (defined('PHOTOSHOP_ORDER_PHP'))
{
$lang_photoshop_email_order = <<<EOT
Hello {USER_NAME},
Thank you for your order at {SITE_NAME} with the order id {ORDER_ID}.
Please transfer USD {PRICE} as soon as possible.
A USD10.00 charge will be added for shipping and handling to Canada, USA and Mexico. Worldwide shipping and handling charge is USD15.00. This price is per CD.
<a href="{LINK}">{LINK}</a>
{ADMIN}
EOT;
$lang_photoshop_email_admin = <<<EOT
Hello {ADMIN},
{USER_NAME} just made an order on your site {SITE_NAME}. The id of that order is {ORDER_ID} and the total value {PRICE}.
<a href="{LINK}index.php?file=photo_shop/photo_shop_admin">Click to go to the order manager</a>
Other placeholders you can use (blank if these user profile fields haven't been filled in):
user_profile1: {USER_NAME}
user_profile2: {USER_ADDRESS}
user_profile3: {USER_PHONE}
user_profile4: {USER_CELL}
user_profile5: {USER_EMAIL}
user_profile6: {USER_PROFILE6}
Best regards,
{ADMIN}
EOT;
$lang_photoshop_email_attach_header = <<<EOT
Here we can have the invoice header like address etc
FOTOS BY ERIKA
1300 Bloor St., SPH6
Mississauga, ON Canada
01-905-212-9111
EOT;
}
$lang_photoshop_register = array(
'already_member' => 'Already a member',
);
$lang_photoshop_config = array(
'save_cfg' => 'Save new configuration',
'new_item' => 'Create new item',
'title' => 'Shop configuration',
'type' => 'Type',
'price' => 'Price',
'name' => 'Description',
'max_items' => 'Max items on CD',
'priority' => 'Priority',
//new 1.3
'update_alb' => 'Update album',
'reset_alb' => 'Reset album',
'select_alb' => ' ** Choose an album ** ',
//new 1.3.5
'ship_item' => 'Shipping',
'order' => 'Order',
//new 1.3.6
'shop_enabled' => 'Shop enabled for this album',
'all_albs' => 'Set prices for all albums in the (sub)category of this album',
'per_alb_settings' => 'Per Album Settings',
);
$lang_photoshop = array(
'type_chckout' => 'Type',
'item_id_checkout' => 'Item ID',
'amount_checkout' => 'Amount',
'total_checkout' => 'Price total',
'admin_title' => 'Shop', // admin menu button title
'uninstall' => 'Remove the table that was used to store shop data ?',
'USD' => 'USD',
'buy' => 'Add image to shopping basket:',
'send' => 'Add',
'CD' => 'Add to CD',
'CD_price' => 'check basket',
'added' => 'Item added',
'cart' =>'Shopping cart',
'boxcd' =>'Items on CD',
'boxphoto' =>'Items for print',
'go' =>'GO',
'save_amounts' => 'Save new amounts',
'empty_basket' => 'Empty basket',
'each' => 'each',
'title' => 'Title:',
'filename' => 'Filename:',
'size' => 'Size:',
'amount' => 'Amount:',
'total' => 'Total',
'pics' => 'pics',
'pricelist' => 'Pricelist',
'photos' => 'Photos',
'cds' => 'CDs',
'to_many_pics' => 'You have too many pics on the CD, please remove some!',
'on_cd' => 'On CD',
'for_print' => 'For print',
'send_order' => 'Confirm your order',
'goto_cart_cd' => '<a href="index.php?file=photo_shop/photo_shop_cart&box=cd">Open shopping cart</a>',
'email_subject_order' => 'Thanks for your order',
'email_subject_order_admin' => 'You got a new order',
'email_sent' => 'Thanks for your order.<br> We have sent you a confirmation email! <br>Your order will be processed after payment! <br>',
'cart_empty' => 'Your shopping cart is empty.<br> Please add some items first!',
'in_cart' => 'images in cart',
'checkout' => 'Checkout',
'to_go' => 'You can add %s more images to your CD till the next price level',
'to_go_full' => 'The CD is full for this price level',
'to_go_remove' => 'You have added too many images to your CD. Please remove at least %s item(s)!',
'shipping' => 'Shipping',
// gateway integration
'account' => 'Account Number:',
'routing' => 'ABA routing:',
'swift' => 'Swift code:',
'bank' => 'Bank:',
'wire' => 'Pay by wire transfer:',
'paypal' => 'Pay with Paypal:',
'google' => 'Pay with Google Checkout:',
'order_id' => 'Order ID:',
// discount, invoice
'discount' => 'Discount',
'myorders' => 'My Orders',
//1.3.6 continue button
'continue' => 'Continue shopping',
);
if (defined('PHOTOSHOP_ADMIN_PHP'))
{
$lang_photoshop_admin = array(
'u_orders_on_p_pages' => '%d orders on %d page(s)',
'otime_a' => 'Date ascending',
'otime_d' => 'Date decending',
'uid_a' => 'User ID ascending',
'uid_d' => 'User ID decending',
'oid_a' => 'Order ID ascending',
'oid_d' => 'Order ID decending',
'o_board_title' => 'Shop admin',
'Active' => 'Active',
'Archive' => 'Archive',
'OrdersIn'=> 'Orders in',
'managefolder' => 'Manage folder',
'orders' => 'orders',
'switch' => 'Switch to',
'go' => 'Go',
'Orders' => 'Orders',
'mark_all' => 'Mark / unmark all orders',
'NoOrders' => 'No orders',
'SelectedOrders' => 'Selected orders',
'markarchive' => 'Move to Archive',
'markactive' => 'Move to Active',
'delete' => 'Delete',
'new' => 'New order',
'viewed' => 'Viewed order',
'processed' => 'Processed order',
'order_id' => 'Order ID',
'items' => 'Items',
'usd_total' => 'USD total',
'item_price' => 'Price total',
'size' => 'Size',
'config' => 'Config',
'mark_unviewed' => 'Set unviewed',
'mark_viewed' => 'Set viewed',
'mark_payed' => 'Set paid',
'mark_unpayed' => 'Set unpaid',
'mark_sent' => 'Set sent',
'mark_unsent' => 'Set unsent',
'pos' => 'Paid/ sent',
'neg' => 'Unpaid/ unsent',
//new stuff 1.1
'contains' => 'contains',
'order_s' => 'order(s)',
'in_total' => 'In total there are',
'orders_stored' => 'orders stored',
'stored_orders' => 'Stored orders in this folder',
'total_orders' => 'Total orders',
'noitems' => 'No. items',
'volume' => 'Order volume',
'user_id' => 'User ID',
'sort_by' => 'Sort by',
'amount' => 'Amount',
'pid' => 'PID',
'price_pi' => 'price per item',
'usd' => 'USD',
'incl_ship' => 'incl. shipping %discount',
//1.3
'filename' => 'Filename',
//1.4
'download_zip' => 'Download zip'
);
}
?>
[Edit GauGau] Added readability of this thread by using the bbcode tags that you're suppossed to use [/Edit]
-
I'll remember that for next time. Thanks.
-
For me your lang file works without problems on my testbed
Hello Stramm,
Thank you for your order at Coppermine Photo Gallery with the order id 2.
Please transfer USD 6.00 as soon as possible.
A USD10.00 charge will be added for shipping and handling to Canada, USA and Mexico. Worldwide shipping and handling charge is USD15.00. This price is per CD.
http://testbed/cpg1418/
Coppermine Photo Gallery
Here we can have the invoice header like address etc
FOTOS BY ERIKA
1300 Bloor St., SPH6
Mississauga, ON Canada
01-905-212-9111
Item ID Type Amount Price total
1 4x6 1 USD 2.00
For print: 1 pics :: 2.00USD
Shipping :: 4.00USD
--------------------------
Total: 6.00USD
-
So, what does that mean? Where did I go wrong? What does the Parse error message mean?
Parse error: syntax error, unexpected '{', expecting ')' in /home/cecon46/public_html/photo_gallery/lang/english.php on line 1504
Should I uninstall the plugin and reinstall and then try again? Do you think that would be the quickest way to get to the bottom of this?
-
That won't help at all cause the error message means you do not have a problem in the photo shop plugin lang file but in your coppermine lang file. Most probably you've edited that one, too (as I already pointed out above). Undo the changes in the coppermine lang file or zip and attach it to your next post or replace it with a working one from the coppermine archive you've downloaded.
Where to find the lang file you can see in the path within the error message photo_gallery/lang/english.php
-
Oh, how could I have been so stupid. Thank you, thank you a million times. :-*
Now, on to the next thing, when clicking on "Cart" I get the following error message with this headline:
There was an error while processing a database query.
followed by this note:
While executing query "SELECT * FROM cpg_shop_prices WHERE aid=" on 0
mySQL error: 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 '' at line 1
Under that is the following: File: /home/cecon46/public_html/photo_gallery/include/functions.inc.php - Line: 249 Interestingly, there is nothing on that line.
I read some of the others who've received the same or similar error message and I tried the phpMyAdmin database repair but that did nothing. There is a database in there called COPP1. I have no idea how it got there. Would that have been created by Coppermine?
I know I have to do quite a bit of work yet for this shopping cart to work properly. I hope you don't mind showing me the error of my ways.
I'd start a new topic but I can't figure out when that tab is. I don't seem to have one.
-
I'd start a new topic but I can't figure out when that tab is. I don't seem to have one.
You can't tsart a new thread on this board, as it is only for valid plugin contributions, and not for support requests. Go one level up to the plugins board - this is where your individual questions should go into.
-
Stramm
I also encounter that the discount I configured is either allocating it to the Total of Photo's Amount or the total of CD Amount, if a customer order both photos and cd's, the discount calculation is wrong.
Please help !
-
The discount as it is in the actual function is just an example. The array values are explained as well there
//$cd_counter['photo'] number of pics for print
//$cd_counter['cd'] number of pics on CD
//$temp_price[1] price for the CD
//$temp_price[0] price for the pics
So just change the function to do what you want to have
eg. discount for cds and pics
$discount = 0.1 * $temp_price[0] + 0.1 * $temp_price[1];
-
Stramm
Thanks for the help ... Silly me !
e.g. :
if(USER_GROUP == 'Registered'){$discount = 0.10 * $temp_price[0] + 0.10 * $temp_price[1];}
if(USER_GROUP == 'Sponsor25'){$discount = 0.25 * $temp_price[0] + 0.25 * $temp_price[1];}
if(USER_GROUP == 'Sponsor50'){$discount = 0.50 * $temp_price[0] + 0.50 * $temp_price[1];}
This correct ?
-
seems to be OK to me... always depending on what you want to do ;)
-
Stramm, seems to work fine ! Thanx
If I understand it correctly, all orders posted to the datebase (> 1000) before the correct "number format" changes on the core files, will still indeed show incorrectly in the "Admin" and "My Orders" pages ?
-
Hi
How can I set the sort order for pid or photo number numeric before a copy of the shopping cart order is being mailed to the user & admin ?
-
shopping cart and everything seems to work great on this except I have installed 1.3.6 but can not find the paypal feature on this. I'm sure I have the right version installed because the plugin manager lists it as 1.3.6. If anyone can help me implement paypal that would be great.
Thanks
Camster
-
shopping cart and everything seems to work great on this except I have installed 1.3.6 but can not find the paypal feature on this. I'm sure I have the right version installed because the plugin manager lists it as 1.3.6. If anyone can help me implement paypal that would be great.
Thanks
Camster
same here
-
same here
well i found in includes/gateway.inc to change a value to 1 to enable paypal.. and the paypal button came up at checkout.. but it went to paypal sandbox and i am confused... can it not go to where you either pay by credit card or login to paypal? like a regular pay now button?
-
never mind.. didnt look down enough :p
-
I installed fresh version of coppermine and then installed the photo shop plugin and the whole gallery just went blank and its like this each time I reinstall everything. When I delete the plugin manually from the server all goes back to working state however obviously I cant use the plugin. All the sql data added during installation is in the database.
gallery: http://hmr6dobl2ii0.az.pl/shop/
cpg: 1.4.19
photoshop: 1.3.6
Any ideas how I might fix this??
-
Please enable debug mode and post the error message.
-
The debug mode is on and I also added this piece of code I found in some other topics about "blank gallery" in index.php
error_reporting(E_ALL);
ini_set("display_errors", 1);
and there is still nothing...
can this be a configuration problem of the server?? maybe this plugin needs some specific php.ini or other configuration that Coppermine doesnt?? Because the gallery works fine without the plugin installed, it even works fine with the plugin installed however no plugin files... Ive run this plugin on other server and it works fine, however I need to run in on this server...
-
in administrator tools I found this info, however Im too new to coppermine to know if this is at least little helpful
Information about errors
USER:
------------------
Array
(
[ID] => 9a99c4c967375516c3a16af5f107e589
[am] => 1
[lang] => polish
)
==========================
USER DATA:
------------------
Array
(
[user_id] => 1
[user_name] => admin
[groups] => Array
(
[0] => 1
)
[disk_max] => 0
[disk_min] => 0
[can_rate_pictures] => 1
[can_send_ecards] => 1
[ufc_max] => 3
[ufc_min] => 3
[custom_user_upload] => 0
[num_file_upload] => 5
[num_URI_upload] => 3
[can_post_comments] => 1
[can_upload_pictures] => 1
[can_create_albums] => 1
[has_admin_access] => 1
[pub_upl_need_approval] => 0
[priv_upl_need_approval] => 0
[group_name] => Administrators
[upload_form_config] => 3
[group_quota] => 0
[can_see_all_albums] => 1
[group_id] => 1
)
==========================
Queries:
------------------
Array
(
[0] => SELECT extension, mime, content, player FROM cpg14x_filetypes; (0s)
[1] => select * from cpg14x_plugins order by priority asc; (0s)
[2] => delete from `skn63483_martinoliva`.cpg14x_sessions where time<1219573601 and remember=0; (0s)
[3] => delete from `skn63483_martinoliva`.cpg14x_sessions where time<1218367601; (0s)
[4] => select user_id from `skn63483_martinoliva`.cpg14x_sessions where session_id = '90f45ba52fb9aa66552c6bf9802912c4' (0s)
[5] => select user_id as id, user_password as password from `skn63483_martinoliva`.cpg14x_users where user_id=1 (0s)
[6] => SELECT u.user_id AS id, u.user_name AS username, u.user_password AS password, u.user_group+100 AS group_id FROM `skn63483_martinoliva`.cpg14x_users AS u INNER JOIN `skn63483_martinoliva`.cpg14x_usergroups AS g ON u.user_group=g.group_id WHERE u.user_id='1' (0s)
[7] => SELECT user_group_list FROM `skn63483_martinoliva`.cpg14x_users AS u WHERE user_id='1' and user_group_list <> ''; (0s)
[8] => SELECT MAX(group_quota) as disk_max, MIN(group_quota) as disk_min, MAX(can_rate_pictures) as can_rate_pictures, MAX(can_send_ecards) as can_send_ecards, MAX(upload_form_config) as ufc_max, MIN(upload_form_config) as ufc_min, MAX(custom_user_upload) as custom_user_upload, MAX(num_file_upload) as num_file_upload, MAX(num_URI_upload) as num_URI_upload, MAX(can_post_comments) as can_post_comments, MAX(can_upload_pictures) as can_upload_pictures, MAX(can_create_albums) as can_create_albums, MAX(has_admin_access) as has_admin_access, MIN(pub_upl_need_approval) as pub_upl_need_approval, MIN( priv_upl_need_approval) as priv_upl_need_approval FROM cpg14x_usergroups WHERE group_id in (1) (0s)
[9] => SELECT group_name FROM cpg14x_usergroups WHERE group_id= 1 (0s)
[10] => update `skn63483_martinoliva`.cpg14x_sessions set time='1219577201' where session_id = '90f45ba52fb9aa66552c6bf9802912c4' (0s)
[11] => SELECT user_favpics FROM cpg14x_favpics WHERE user_id = 1 (0.001s)
[12] => DELETE FROM cpg14x_banned WHERE expiry < '2008-08-24 11:26:41' (0s)
[13] => SELECT * FROM cpg14x_banned WHERE (ip_addr='89.243.224.149' OR ip_addr='89.243.224.149' OR user_id=1) AND brute_force=0 (0s)
[14] => SELECT COUNT(*) FROM cpg14x_pictures WHERE approved = 'NO' (0s)
[15] => SELECT user_name AS user_name, aid, a.title
FROM cpg14x_albums AS a
LEFT JOIN `skn63483_martinoliva`.cpg14x_users AS u
ON (category - 10000) = user_id
WHERE category > 10000 (0.001s)
[16] => SELECT aid, title, name FROM cpg14x_albums LEFT JOIN cpg14x_categories ON cid = category WHERE category < 10000 ORDER BY title (0.001s)
)
==========================
GET :
------------------
Array
(
)
==========================
POST :
------------------
Array
(
)
==========================
VERSION INFO :
------------------
PHP version: 5.2.6 - OK
------------------
mySQL version: 5.1.26-rc-log
------------------
Coppermine version: 1.4.19(stable)
==========================
Module: GD
------------------
GD Version: bundled (2.0.34 compatible)
FreeType Support: 1
FreeType Linkage: with freetype
T1Lib Support:
GIF Read Support: 1
GIF Create Support: 1
JPG Support: 1
PNG Support: 1
WBMP Support: 1
XPM Support: 1
XBM Support: 1
JIS-mapped Japanese Font Support:
==========================
Module: mysql
------------------
MySQL Supportenabled
Active Persistent Links 0
Active Links 1
Client API version 5.1.26-rc
MYSQL_MODULE_TYPE external
MYSQL_SOCKET /tmp/mysql.sock
MYSQL_INCLUDE -I/usr/local/include/mysql
MYSQL_LIBS -L/usr/local/lib/mysql -lmysqlclient_r
==========================
Module: zlib
------------------
ZLib Support enabled
Stream Wrapper support compress.zlib://
Stream Filter support zlib.inflate, zlib.deflate
Compiled Version 1.2.3
Linked Version 1.2.3
==========================
Server restrictions (safe mode)?
------------------
Directive | Local Value | Master Value
safe_mode | On | On
safe_mode_exec_dir | no value | no value
safe_mode_gid | Off | Off
safe_mode_include_dir | no value | no value
safe_mode_exec_dir | no value | no value
sql.safe_mode | Off | Off
disable_functions | exec,system,shell_exec,passthru,escapeshellcmd,escapeshellarg,proc_close,proc_open,proc_open,set_ini,ini_alter,eval,popen,dl,pcntl_exec,php_uname,posix_uname,disk_free_space | exec,system,shell_exec,passthru,escapeshellcmd,escapeshellarg,proc_close,proc_open,proc_open,set_ini,ini_alter,eval,popen,dl,pcntl_exec,php_uname,posix_uname,disk_free_space
file_uploads | On | On
include_path | .:/usr/lib/php:/usr/local/lib/php | .:/usr/lib/php:/usr/local/lib/php
open_basedir | no value | no value
==========================
email
------------------
Directive | Local Value | Master Value
sendmail_from | no value | no value
sendmail_path | /usr/sbin/sendmail -t -i | /usr/sbin/sendmail -t -i
SMTP | localhost | localhost
smtp_port | 25 | 25
==========================
Size and Time
------------------
Directive | Local Value | Master Value
max_execution_time | 30 | 30
max_input_time | 60 | 60
upload_max_filesize | 2M | 2M
post_max_size | 8M | 8M
==========================
Page generated in 0.051 seconds - 17 queries in 0.003 seconds - Album set : ; Meta set: ;
Warnings
/bridge/udb_base.inc.php
* Notice line 717: Undefined variable: listArray
* Warning line 724: Invalid argument supplied for foreach()
/include/functions.inc.php
* Notice line 2694: Undefined variable: i
* Warning line 2696: Invalid argument supplied for foreach()
* Warning line 2696: Invalid argument supplied for foreach()
/include/functions.inc.php(2706) : eval()'d code
* Warning line 1: array_multisort() [function.array-multisort]: Argument #1 is expected to be an array or a sort flag
-
can this script be blocked somehow by .htaccess ??
-
I disabled the plugin, installed the photo shop, and found out that it doesnt show in the Plugin Manager as installed, it doesnt show at all... so maybe during the installation something went wrong?? how can I install it manually??
-
I hope you uploaded the photo_shop directory into the plugins dir?
-
omg, of course I did... can u actually try to ANSWER one of my questions?? (please)
-
I'll bounce another idea off you... maybe this will ring a bell :P can this be happening because this server has SAFE MODE ON??
-
answers to your questions
... can this be a configuration problem of the server??
Yes, it can but it musn't. If yes, then I can't tell you exactly where it is as I do not administer your box and I haven't seen such a behaviour before.
... can this script be blocked somehow by .htaccess ??
Yes, you should know better than I do as you have access to your htaccess files and most probably you've put it on your server yourself.
... so maybe during the installation something went wrong??
It may if you haven't uploaded the plugin into a wrong location (eg. with overwriting coppermines init.inc.php, functions.inc.php - that's why I ask some questiones - if you know better than I do what to ask and what to answer, then maybe you can answer your questions yourself)
... can this be happening because this server has SAFE MODE ON
not likely
... how can I install it manually??
upload it into the plugins dir, make the necessary entries to the db, the first into the plugins table (where you already deleted it once), the other entries are in one of the plugins subdirs (sql)... adapt the table names and use a tool like phpmyadmin to add them
-
not likely
it was actually... I wrote to admins to activate my own php.ini on my account that turned of the safe mode, installed the plugin again and all works fine now... problem solved...
I didnt want to insult you Stramm if u got it that way... as I saw it: you wrote the plugin and know how it works, I have access to my files and server, and I need to bounce off you my ideas about what went wrong so you either could dismiss them or take them under consideration, however the questions needed to be answered or I would just be talking to a wall... I think I was not unresonable in taking such approach... Anyway its much better then "omg! i install and it not work, HELP" ;D
thx for help, great plugin btw :D
-
hello, thank you very much for this greate module, it is exactly what i was looking for.
i have one question please:
if i want to sell diferent size images how do i deel with it please? say image "x.jpg" has 3 diferent dimenssions
should i upload all diferent sized images or maybe there is a module over here that i can use? then just set diferent price for diferent size?
thank you very much for your help in advance
-
I have a layout problem with my photo_shop in a fotopage that i am working on (you can look at the page om this adress: www.fyrvikafoto/galleri).
When i open it in Safari-browser (and Firefox on my mac) the "menu", were you choose picturessize and put the pictures inn the basket, are view over tre lines (se picture), instead of one. It works great inn IE and Firefox inn Windows Vista, and in Firefox on the mac i have at my workingplace.
Is this a isue related to the theam i am using (blix) or the photo_shop, and have someone a suggestion about what file i can find the code for this "menu"?
Mvh Tony Gulla
-
I have a layout problem with my photo_shop in a fotopage that i am working on (you can look at the page om this adress: www.fyrvikafoto/galleri).
When i open it in Safari-browser (and Firefox on my mac) the "menu", were you choose picturessize and put the pictures inn the basket, are view over tre lines (se picture), instead of one. It works great inn IE and Firefox inn Windows Vista, and in Firefox on the mac i have at my workingplace.
Is this a isue related to the theam i am using (blix) or the photo_shop, and have someone a suggestion about what file i can find the code for this "menu"?
Mvh Tony Gulla
The correct url for my page is: www.fyrvikafoto.no/galleri
Tony:)
-
I wasn't able to spot the "Powered by Coppermine" tag on your page. There will be no support for you unless you permanently restore the tag.
-
hello,
any body please, can point me somewhere where i can read about how to deal with diferent sized images? when i want to sell.
should i upload diferent sizes? please
or maybe should i install a diferent module?
thank you very much in advance for your help
-
Hello,
i can´t put the shop to work!
1) i have permited the plugins, they are enabled.
2) i uploaded the modify files and now i am triying to upload the photo_shop_1.3.6.zip to the plugin manager...
it tells me that it can´t be installed...
what i am doing wrong?
thanks a lot!
-
I wasn't able to spot the "Powered by Coppermine" tag on your page. There will be no support for you unless you permanently restore the tag.
Hello:)
I´m not finishd whit the page get, and will add this tag before it become public. I thougt it was there, but i se now that the maker of the theme has removed it.
I hope someone will help med with my problem, and maybe also tell me which file to putt the "Powered by Coopermine" tag?
Mvh Tony
-
Hello,
i can´t put the shop to work!
1) i have permited the plugins, they are enabled.
2) i uploaded the modify files and now i am triying to upload the photo_shop_1.3.6.zip to the plugin manager...
it tells me that it can´t be installed...
what i am doing wrong?
thanks a lot!
unzip and then upload the photo_shop directory into the plugins dir
-
Hi
Is there any way to let the cart or checkout when emailing the user and admin sort the files according to pid / filename ?
The idea is when getting the order, that all the files are sorted according to pid (in my case title) ASC.
-
Hello, I need some help because probably I did the installation wrong:
In the description how to install everything was going fine, but may be that I did not very well understood the remarks for css_changes, what I understood was that I had to copy the lines off the txt-file changes and insert them into the style.css-File of the classic.theme-folder with this file, I did copy it on the end.
After this, when I put items in the basket and go to checkout, there should be a login form coming with the content of the field inside the custome fields (updated or not with name, adress, zip....), but I updated.
But going to checkout there was no appearing of this login form ???
Thanks and by
GH
-
Hello,
I need to know how can I change (and where) character set to UTF-8.
Thanks a lot. ;)
-
If utf-8 doesn't work, then probably the language file needs to be saved in utf-8. Open it with a text editor and save in the encoding you need.
-
Damn, thanx. I forgot about it. I saved file in utf-8 and it work.
:)
-
anyone willing to modify this code for me?
german speaking programmers preferred ...
oreste(x)oreste(d)com
-
Everything works great, except I'm a total newb when it comes to paypal. How do I get it to sync with the checkout/order confirm instead of it going to sandbox?
It's probably something so easy but I can't figure it out lol ???
-
1st post of this thread:
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
-
Yeah - thanks. I already knew how to enable it, and had it enabled, it was just the configuration that wasn't working.
But it turned out I was doing everything correctly, it was just an issue with paypal.
Thanks though! ;D
-
Issues with options ordering in admin:
When I am modifying my client's options in Shop, the first 4 only let me move them down (only the down arrow is showing), but all the rest below that let me move them up, or down, until one of them is moved into the top 4th slot, then the the ability to go up more is removed? Trying to search for this but I'm not finding anything and it happens on 3 of my client's sites. Very frustrating!
-
I'm also having a problem with the check out process. When an item is placed in the cart and the customer clicks on the "X items in cart" and tries to check out from there, a page comes up wanting a username and password with the button saying "Authenticate".
But when the customer clicks on Checkout from the menu, there's no problems. Unfortunately this will confuse a lot of people and my client needs this resolved *today*.
-
Issues with options ordering in admin:
When I am modifying my client's options in Shop, the first 4 only let me move them down (only the down arrow is showing), but all the rest below that let me move them up, or down, until one of them is moved into the top 4th slot, then the the ability to go up more is removed? Trying to search for this but I'm not finding anything and it happens on 3 of my client's sites. Very frustrating!
That issue is corrected in the new version of the shop (not yet published)
-
I'm also having a problem with the check out process. When an item is placed in the cart and the customer clicks on the "X items in cart" and tries to check out from there, a page comes up wanting a username and password with the button saying "Authenticate".
I can't replicate this behaviour with the shop version 1.3.6. Codingwise it's not likely, too, as the check if the user is logged in or not doesn't depend in any kind on the type of link or where it is placed. It's a check in photo_shop_checkout.php that's using Coppermines base functions for that.
But when the customer clicks on Checkout from the menu, there's no problems. Unfortunately this will confuse a lot of people and my client needs this resolved *today*.
If you need time critical support you should hire a programmer. I'm coding in my free time and I even clearly stated in the shops announcement thread (this very thread) that I won't give support for it. However I did most of the time. Still that's no reason to demand immediate support or to PM me unasked.
-
That issue is corrected in the new version of the shop (not yet published)
Thanks, I'll gladly wait for it if I ca fix the other issue.
Still that's no reason to demand immediate support or to PM me unasked.
I was stating a sense of urgency, most definitely NOT demanding (I understand it can be hard to differentiate but it is what it is) and did not see any rules that I couldn't PM someone without a written invitation. If you don't want to be hired a simple no thank you would suffice.
Unfortunately, I can't resolve it. I can duplicate it every time and it does it when I click on continue shopping and all the other buttons, even when I totally uninstall and reinstall everything and use different versions of both Coppermine and Photo Shop. Off to see if I can find a programmer.
-
Check cookie issues (clear cookies and retry). Another point could be subdomain issues. www.domain.com is not domain.com -> means if one button sends you to domain.com and the other to www.domain.com then this may be a problem.
That's what happens when I click the checkout button - if it's different for you, then the easiest fix would be to remove one of the buttons.
Case 1: I'm logged in
- a) clicking checkout from within the cart (below item list) -> checkout confirmation page
- b) clicking checkout from within the menu -> checkout confirmation page
Case 2: I'm not logged in
- a) clicking checkout from within the cart (below item list) -> signup and login page
- b) clicking checkout from within the menu -> signup and login page
and did not see any rules that I couldn't PM someone without a written invitation
From the registration page (rules you agreed to on signing up)
11. Post publicly
Sending private messages to supporters or devs, asking for help or support is a bad idea. The whole point of a support board is that others can see your questions and the replies. There is no individual support by email or private message. If sensitive information like an admin account is needed, the supporter will ask for it.
If you don't want to be hired a simple no thank you would suffice.
You didn't say you intended to hire me so I haven't had any chance to say: 'No thanks!'.
and my client needs this resolved *today*
I was stating a sense of urgency, most definitely NOT demanding
Ok, maybe I got you wrong here
-
I was stating a sense of urgency, most definitely NOT demanding (I understand it can be hard to differentiate but it is what it is)
I felt the same way Stramm did - your posting sounded exactly as Stramm said.
and did not see any rules that I couldn't PM someone without a written invitation.
Really? That's amazing. As Stramm pointed out, it's part of the board rules that you agreed to respect when signing up. Additionally, it's available in the very board navigation: the link "board rules" (between the menu items "Search" and "Profile") would have lead you to11. Post publicly
Sending private messages to supporters or devs, asking for help or support is a bad idea. The whole point of a support board is that others can see your questions and the replies. There is no individual support by email or private message. If sensitive information like an admin account is needed, the supporter will ask for it.
In other words: you are not allowed to send a PM or email to the supporters, devs or anyone else on this forum unless you have explicitely been given permission to do so.
The only exception to this rule are security-related issues that have an impact on the most recent stable release: if you have discovered a security flaw in coppermine, you're allowed to contact one of the devs directly to alert him of the potential flaw.
Review your attitude!
-
You didn't say you intended to hire me so I haven't had any chance to say: 'No thanks!'.
That was in the PM.
I apologize my intent was misunderstood, it's often difficult to convey meaning in text.
-
Check cookie issues (clear cookies and retry). Another point could be subdomain issues. www.domain.com is not domain.com -> means if one button sends you to domain.com and the other to www.domain.com then this may be a problem.
That's what happens when I click the checkout button - if it's different for you, then the easiest fix would be to remove one of the buttons.
Case 1: I'm logged in
- a) clicking checkout from within the cart (below item list) -> checkout confirmation page
- b) clicking checkout from within the menu -> checkout confirmation page
Case 2: I'm not logged in
- a) clicking checkout from within the cart (below item list) -> signup and login page
- b) clicking checkout from within the menu -> signup and login page
Thank you for still taking time to look into this, all the buttons go to www.domain.com I've made sure to clear cookies and cache and tried it on 2 browsers.
When logged out, the same problem exists. Any of the buttons (continue shopping, empty basket, etc) send me to the "authenticate" page.
-
post a link to the gallery... I still can't replicate what you report
-
www.fullofgracephotography.com/testingcart
-
from what I see I'd say you use a modified version of the shop
-
I don't know why, but I installed it elsewhere www.fullofgracephotography.com/test2 and added the Photo Shop before updating the tempate, and it works fine now, I did change the address to the CSS file to the complete URL, so maybe that was it? Thanks for the help!
-
Last issue then I'll be gone. My client wants to have be able to have customers add an image (free) to the cart to be placed on birth announcement (not free).... I got everything figured out except how to make the line show for the free image. I noticed Stramm's site has 2 options for a free image, but I'm not able to replicate it on the clients. Tried leaving it completely blank, 0.00, and entering "free". Thanks once again.
-
this feature is part of the new version
-
Same cart, new issue. My client's site got hacked (only this Photo Shop for Coppermine was affected/messed with)... everything seems to be working again but I can't get paypal to show the correct amount...
This is the price list for images on CD(please note that everything worked prior to this hacker attack):
CDs
1 Full Resolution Image - USD 20.00 (max items on CD 1)
2 Full Resolution Images - USD 40.00 (max items on CD 2)
3 Full Resolution Images - USD 60.00 (etc)
4 Full Resolution Images - USD 80.00
5 Full Resolution Images - USD 100.00
6 Full Resolution Images - USD 120.00
7 Full Resolution Images - USD 140.00
8 Full Resolution Images - USD 160.00
9 Full Resolution Images - USD 180.00
10 Full Resolution Images - USD 200.00
11 Full Resolution Images - USD 220.00
12 Full Resolution Images - USD 240.00
13 Full Resolution Images - USD 260.00
14 Full Resolution Images - USD 280.00
The cart shows the correct total, like if the customer orders 2 images on CD, it shows as $40+ shipping, but when the customer goes to paypal, the total is $80+shipping within paypal.
-
Is there any easy way to to change for example "Photo" or "CD" in the buy drop down menu to something else like "tif file" or "jpg file" ?
I would also like to be able to auto attach download link to customer invoice (I prefer to thrust my customers to pay within 30 days of ordering)
Is this possible and would you like to do it for us?
-
Re: Taxes added
Mr. Stramm thank you so much for the incredible plugin, I and my users have found it very useful and just as important DEPENDABLE!
I am the 'web person' for a small photography 'strore' for my mother and wife.
They would like to implement a 'tax' feature on checkout.
I do realize that there has been a post you made to a German gentleman about how to implement it (http://forum.coppermine-gallery.net/index.php/topic,32231.msg213217.html#msg213217). I followed the steps and it will NOT show on my screen.
I'm very eager to learn how to fix it but unfortunately I'm a green horn to PHP.
What I would like is it to add 8.25% tax to the tot-price and show that amount in the check out screen (right before you confirm your order) and it show the tax amount to the user in their email.
Here's the steps I've done so far...
In the functions.inc.php I've added
$tax = number_format(($tot_price*.825),2);
Directly under the $tot_price = field
<br/>Incl. MWSt.: {$tax}{$lang_photoshop['USD']}
right beneath the {total_price}
$out['text'] .= sprintf("%+63s\n", 'Incl. MWSt: '.$tax.$lang_photoshop['USD']);
Right above the return $out[template]; field.
I then went into my english.php section and added
'tax' => "Total Taxable",
right under the $lang_photoshop_register = array( section
I would appreciate your help very much, I wish i was more proficient and knew exactly what you needed from me to help you but unfortunately I do not.
Please tell me if there's anything else you require from me, sir.
If you'd like a link to my gallery I'll be more than happy to PM you the information if you so request.
Thankfully,
Jason
-
Is it possible to use multiplier or % + and - amounts etc in the price calculation?
Like putting -50 or +10% in the price field of shop configuration
Regards/ Stefan
-
Stramm, I FOUND IT!! I put it in the right place (The tax forms) and it works almost exactly how I need it too!
One thing I DO need that I can't for the life of my figure out is I have the calculation worked out on the appropriate tax amount...how or where do I put $tax to get it to add automatically to $total_order??
I SWEAR I've been SCOURING the net and any book I can find on PHP to learn myself, but, It hasnt helped...
-
In Germany tax is 19%
$tax = number_format(($tot_price/119*19),2);
For a tax of eg 25% change it to
$tax = number_format(($tot_price/125*25),2);
-
Hi I was search but can't find.
How can I move the shopping plugin buttons(images in cart, checkout...), somewhere else in theme?
Tnx
-
Hi I was search but can't find.
How can I move the shopping plugin buttons(images in cart, checkout...), somewhere else in theme?
Tnx
That info you can find in the first post of this thread.
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
-
I was wondering if Modpack 1 ( http://stramm.st.funpic.org/displayimage.php?album=lastup&cat=0&pos=0 ) and Photo Shop (http://stramm.st.funpic.org/albums/userpics/10001/photo_shop_1_3_6.zip) are different. Does the modpack include photo shop plugin already?
-
In Germany tax is 19%
$tax = number_format(($tot_price/119*19),2);
For a tax of eg 25% change it to
$tax = number_format(($tot_price/125*25),2);
Hello again Stramm, I sure appreciate your help!
What I'm wanting to do is add the tax to the total amount tag.
I've added all the numbering (and function to create the correct tax amounts). I have "Tax" shown where i want it on the display screen, but, I want to add the $tax amount to the $total_price tags so it will show the tax in the TOTAL amount area.
I guess what I'm trying to do is to make it display $tax+$total_price= X
Thanks for the help, I'm learning alot! The keytags and info you put in the software really help me see what does what when I look through it!
- Jason
-
the total price is including the tax... just read that line
$tax = number_format(($tot_price/125*25),2);
-
the total price is including the tax... just read that line
$tax = number_format(($tot_price/125*25),2);
Ok, Got it!! Thank you!
Looks like I'm going to have to learn how to add 2 classes together and display them as the total!
Thanks for your help, I just read it wrong. :)
Merry Christmas!
- Jason
-
I have 2 problems with this plugin. I've coded a skin for a client from a psd file. They already have this plugin installed on their site. I have 2 issues that I need to clear up.
1. How do I change the buttons to be links? Where is the code for this what file is it in? The little checkout menu and what have you has buttons but the theme we have done does not & I need to change this to make it stay all the same for my client.
2. After I click continue to checkout everything goes nuts in the theme. Its all out of whack. How do I solve this? Is the css meant to solve this problem that was provided in the plugin or is there some other way to solve it?
Thanks
-
2. http://forum.coppermine-gallery.net/index.php/topic,53041.msg257802.html#msg257802
1. codebase.php - function photoshop_user_menu() - that's mainly pure html. So it should be no problem for you to modify it as needed.
-
2. http://forum.coppermine-gallery.net/index.php/topic,53041.msg257802.html#msg257802
Did not work it made it WAYYYY worse :( I've attached screen shots of before & after I click on the checkout button.
1. codebase.php - function photoshop_user_menu() - that's mainly pure html. So it should be no problem for you to modify it as needed.
Worked & its now fixed, thanks.
-
Sorry but apparently I cannot edit my last post...I attached the same shot twice, here's the other screen shot the after I click shot.
-
in the before-viewcart.jpg I can't spot a problem... please point it out more clearly where you see an issue
-
Its in the after view cart. I put the before view so you could see what it should look like just to give you an idea.
-
please zip your theme and attach it to your next post
-
I'm sorry but I cannot do that. As I said this is a theme for a client not a hobby site or just someone who is doing this in their spare time, this is a client's business site. I cannot post the theme in open forum for everyone to get it. This theme is a custom theme for that site only.
The theme is set in tables and I put the gallery code inside the center part of the table so just like the regular themes it should all fit in the center just like everything else. If you PM me your e-mail or something I can send you the files but I cannot post them on open forum. Thanks
-
please zip your theme and attach it to your next post
Stramm I talked to my client adn they gave the ok for me to upload a zip file of the skin. Please let me know if we can fix this problem. Thanks.
-
I have been experimenting with the paypal capability of the plugin on my test server and I am having trouble with making the paypal return url work. I have specified a return url in gateway.inc.php, and when posting a payment to the paypal sandbox I get the "Return to ... " button. Looking at the rollover url the root of my coppermine installation gets inserted at the front of my specified url (I assume thats intended), but when I click the return button the paypal sandbox url gets inserted as a prefix to that.
For example if I put 'index.php' in the url parameter, the return button in the sandbox will try to go to :
https://www.sandbox.paypal.com/us/cgi-bin/http%3A%2F%2Flocalhost%2FJoeAustinPhotography%2Fcpg1418%2Findex.php?merchant_return_link=Return+to+Joe+Austin%27s+Test+Store
Which results in a "404 - Webpage not found" error
Is there something I am missing in using the return url parameter?
I don't see any discussion of problems with it in this thread.
Thanks,
Joe.
-
Hello,
Thank you Stramm for making this excellent plugin and for all the support.
I was wondering if it is possible to add the "Add image to shopping basket" form to the top description bar on the Enlargeit plugin here http://forum.coppermine-gallery.net/index.php/topic,53290.0.html (http://forum.coppermine-gallery.net/index.php/topic,53290.0.html) and if so, how would I go about doing it?
Link to my gallery is: http://ederphotography.site50.net/cpg1419/ (http://ederphotography.site50.net/cpg1419/)
Thanks in advanced
-
Stramm I talked to my client adn they gave the ok for me to upload a zip file of the skin. Please let me know if we can fix this problem. Thanks.
I haven't had time to look into that till now. But I'll post the new shop version today. Most probably it'll fix your problem.
-
I have been experimenting with the paypal capability of the plugin on my test server and I am having trouble with making the paypal return url work. I have specified a return url in gateway.inc.php, and when posting a payment to the paypal sandbox I get the "Return to ... " button. Looking at the rollover url the root of my coppermine installation gets inserted at the front of my specified url (I assume thats intended), but when I click the return button the paypal sandbox url gets inserted as a prefix to that.
For example if I put 'index.php' in the url parameter, the return button in the sandbox will try to go to :
https://www.sandbox.paypal.com/us/cgi-bin/http%3A%2F%2Flocalhost%2FJoeAustinPhotography%2Fcpg1418%2Findex.php?merchant_return_link=Return+to+Joe+Austin%27s+Test+Store
Which results in a "404 - Webpage not found" error
Is there something I am missing in using the return url parameter?
I don't see any discussion of problems with it in this thread.
Thanks,
Joe.
The new version (somewhen up today) will fix that. It's a known problem.
-
new version is up
new version: http://forum.coppermine-gallery.net/index.php/topic,57206.0.html