[cpg1.4.x]: Shopping cart (new version) - Page 6 [cpg1.4.x]: Shopping cart (new version) - Page 6
 

News:

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

Main Menu

[cpg1.4.x]: Shopping cart (new version)

Started by Stramm, December 21, 2008, 11:43:01 AM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

Stramm

rg. is a typo as Fabricio already pointed out. Put there any value. And most probably you'll see the bom, these strange characters for a short time on the top left corner of your browser window, maybe a second or less. If not, use another value and reload. To search for these characters use copy/ paste.

In the end that means it's a somehow modified file. Usually the bom got attached by an editor. That stops the script from working.

sportbilderna

I use cpg.14.21 and photo_shop_1_4

I use Calculate discount. And this problem only occurs when i use discount.

This is what happens,

When the customer adds about more than 3 images, the next 4, 5, 6 and so on, subsequent
images will not display as new post, the new images  shown in the already selected pictures in the cart
(update new number in an already added image)
It shows never about more than 3 lines, but the correct number as ordered. Calculation is correct.


www.sportbilderna.se


this is my functions.inc

/ / Calculate discounts, user defined
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 Wednesday CD
/ / $ Temp_price [1] price for the CD
$ Temp_price
  • ;  / / price for the pics

    / / just Thursday to demonstrate how to Calculate a discount
    / / 10% on print images if user orders more than 10 pics


    If ($ cd_counter [ 'photo']> = 3) (
    $ Discount = 0.1 * $ temp_price
  • ;
    )


    / *
    / / Or another example ... 10% if the order volume is> 100USD
    If ($ temp_price
  • > = 100) (
    $ Discount = 0.1 * $ temp_price
  • ;
    )
    * /
    Return $ tag;

    Thanks for a good plugin

    /Thomas

Jimed

PhotoShop 1.4 is working well in a test gallery with the exception of IPN.  I have read PayPal docs and am afraid that I am still way over my head and getting invalid transactions like this.

Bad order (PayPal says it's invalid): HTTP/1.1 200 OK
Date: Sun, 15 Mar 2009 02:03:08 GMT
Server: Apache/1.3.33 (Unix) mod_fastcgi/2.4.2 mod_gzip/1.3.26.1a mod_ssl/2.8.22 OpenSSL/0.9.7e
Set-Cookie: c9MWDuvPtT9GIMyPc3jwol1VSlO=cXQvTHuWCApU4LE2HK7IlQdAY4IxHA9aYOcw45zrRMW-Vbgshd90TKLVnqB_lAPhbQi7A3WN0mwkIbgcBtx4tjEInLqL4KiCjIbyPVds-JFtmZrdEHQEMaTnimvZ-UeT6ASSYG%7ckzVD57mhKqb91uTePLomb9KUC_sYYThHVugeJTETLKIItj9r3YMQ7oa_Lo99N69g67CZpm%7cM_2PRzxU17LBUjEGEUG14aB7J_A8BLn-pfHvsLO4rwdNMmtEI9r3FRU4GxVsY4pjuFNb0W%7c1237082588; domain=.paypal.com; path=/
Set-Cookie: cookie_check=yes; expires=Wed, 13-Mar-2019 02:03:08 GMT; domain=.paypal.com; path=/
Set-Cookie: navcmd=_notify-validate; domain=.paypal.com; path=/
Set-Cookie: navlns=0; expires=Sat, 10-Mar-2029 02:03:08 GMT; domain=.paypal.com; path=/
Set-Cookie: Apache=10.191.196.11.148241237082588295; path=/; expires=Fri, 30-Jan-03 19:34:52 GMT
Connection: close
Transfer-Encoding: chunked
Content-Type: text/html; charset=UTF-8

7
INVALID
0

Gallery is located  http://www.opticalharmonics.com/demo/

May I ask a few questions please.
1. In Shop config, SSL URL to coppermine base dir...  should this be https://opticalharmonics.com/demo/  or http: as the default?

2. In PayPal Sandbox IPN activation should the URL be the same as above?

3. As no variables are being listed in the transactin log email, is there anything else I should be checking?

One little note for the next update, in the success dialog displayed after the order, "purchased" is misspelled.

Thanks for the great plugin.


Stramm

Quote from: sportbilderna on March 14, 2009, 11:29:05 AM
I use cpg.14.21 and photo_shop_1_4

I use Calculate discount. And this problem only occurs when i use discount.

This is what happens,

When the customer adds about more than 3 images, the next 4, 5, 6 and so on, subsequent
images will not display as new post, the new images  shown in the already selected pictures in the cart
(update new number in an already added image)
It shows never about more than 3 lines, but the correct number as ordered. Calculation is correct.


www.sportbilderna.se


I checked with my local install (just uncommenting the needed part from the discount function) and all works well.
However I couldn't see what you've done as the code you posted probably got modified by the forum app. That's why the forum offers bbcode for code (the button next to the quote button named #). Please use that an again post your code. Also reupload the english language file. That's easier for me and can be used to exclude the lang file as culprit.

Stramm

Quote from: Jimed on March 15, 2009, 03:28:09 AM
PhotoShop 1.4 is working well in a test gallery with the exception of IPN.  I have read PayPal docs and am afraid that I am still way over my head and getting invalid transactions like this.

Is the test gallery on your computer at home?

Quote1. In Shop config, SSL URL to coppermine base dir...  should this be https://opticalharmonics.com/demo/  or http: as the default?
If you do not have ssl enabled on your webserver it's of course not https but http. However it's mandatory to use it (security - read paypal docs as well). Talk to your webhost.

Quote2. In PayPal Sandbox IPN activation should the URL be the same as above?
http://www.paypal.com/cgi-bin/webscr?cmd=p/sell/ipn-test-outside

Quote3. As no variables are being listed in the transactin log email, is there anything else I should be checking?
No log means no connection to PayPal -> see me first question... Is your test gallery on a web server ort on your computer at home


QuoteOne little note for the next update, in the success dialog displayed after the order, "purchased" is misspelled.
Thanks you... however I've searched through the entire language file and couldn't find 'purchased'. Maybe you can make a screenshot of it?

sportbilderna

QuoteI checked with my local install (just uncommenting the needed part from the discount function) and all works well.
Now i understand, and it looks good now when i test.
QuoteHowever I couldn't see what you've done as the code you posted probably got modified by the forum app. That's why the forum offers bbcode for code (the button next to the quote button named #).
Now, I learned that too.
QuoteAlso reupload the english language file. That's easier for me and can be used to exclude the lang file as culprit.
Sorry.....

It seems to work and I thank you so much for your help.....
best regards/thomas

sportbilderna

QuoteNow i understand, and it looks good now when i test.
I was probably a little bit hurry.....

Now I have uploaded the original file, functions.inc and it does not work anyway.
When i adds about more than about 7-10 images, i get the same problem.

Should I try to reinstall?

Should I attach another file for you to see.


Stramm

Tried it on your server and works for me just fine (with 13 images in cart)

Clear your cookies and retry. If that doesn't do the trick, post the code you use as I told you above and upload the english language file (see my above post).

Jimed

Quote from: Stramm on March 15, 2009, 12:52:54 PM
Is the test gallery on your computer at home?
No, on shared server at host.

QuoteIf you do not have ssl enabled on your webserver it's of course not https but http. However it's mandatory to use it (security - read paypal docs as well). Talk to your webhost.
I can access demo site with https but getting a self signed certificate warning, would this cause problems with PayPal?

Quotehttp://www.paypal.com/cgi-bin/webscr?cmd=p/sell/ipn-test-outside
Would have never figured that out!  Will try, thank you.  (Good thing I can use a camera.)

QuoteThanks you... however I've searched through the entire language file and couldn't find 'purchased'. Maybe you can make a screenshot of it?
Line 276, search for "purcheased"

Stramm

Quote from: Jimed on March 15, 2009, 04:51:47 PM
I can access demo site with https but getting a self signed certificate warning, would this cause problems with PayPal?
To test use http. For production use that's however no option

QuoteLine 276, search for "purcheased"
Thanks ;)

jaus

Quote from: Stramm on March 14, 2009, 08:57:30 AM
rg. is a typo as Fabricio already pointed out. Put there any value. And most probably you'll see the bom, these strange characters for a short time on the top left corner of your browser window, maybe a second or less. If not, use another value and reload. To search for these characters use copy/ paste.

In the end that means it's a somehow modified file. Usually the bom got attached by an editor. That stops the script from working.

I have tried quite a few random values in place of 'cancel' but I do not see anything but an empty page, even for just a second. 
I did try to cut and paste the bom characters from your earlier post for a search in the photoshop english lang file and the photoshop_paypal_ipn file, but did not find any match.

The files were uploaded directly to the server and have not been exposed to any editor.


Stramm

Quote from: jaus on March 15, 2009, 08:02:04 PM
I have tried quite a few random values in place of 'cancel' but I do not see anything but an empty page, even for just a second. 

I do

Synthea

Thanks for the work on this shop Stramm. Just a quick question, I'd like to try and find this out before I get knee deep and find it doesn't work.....My client wants me to upgrade her gallery to 1.5.x - I see your sandbox is 1.4.18 Stramm, so I'm just wondering if anyone has used this with 1.5.x?

Synthea

Nevermind my last post, I managed to talk her out of 1.5, whew. I feel like I just dodged a bullet.

MrMastah

Thank you for this superb plugin Stramm!

I'm trying to make it work on my dev server setup and i discovered that in functions.inc.php on line 210 the VAT (19%) is hardcoded so when I set it to 25 in config it calculates correctly but it doesn't print out the correct %$total_price .= sprintf($lang_photoshop['total_incl'], '19').": {$vat} {$CONFIG['photo_shop_currency']}&nbsp";and also on line 229 (same file)$vat_txt = sprintf($lang_photoshop['total_incl'], '19').": {$vat} {$CONFIG['photo_shop_currency']}";

and this line "You have added to many images to your CD. Please remove at least %s item(s)!" doesn't output the correct amount of pics to remove, it displays the total of pics added to the CD! This needs to be fixed (I dont know how or where)...

Just thought you would like to know :)

Stramm

replace
'19'
with
$CONFIG['photo_shop_vat']

haven't tested this but it should work (that's the calculation for the confirmation email)

mtbiker

Stramm,
  First off, thank you for a wonderful plugin and all the support!

I've installed Photo_Shop and it's working fine except for one thing.  Hopefully you all can help with with it.  It seems pretty easy, but i can't figure it out.

I'm running the Mac OS x theme.  On this theme the PhotoShop Buttons for the items in cart and check out are at the top left underneath the menu buttons.  When I hover over the @ symbal (link to the login links), it puts the login links on top of the buttons.

How do I move either the photo shop button buttons up, or those login links downs so they aren't on top of each other.  I thought this would be easy to correct but I can't find the code that displays the buttons, and I don't know anything about javascript to fix the login links.

Here's a link to my page so you can see what it's doing. http://www.thebrownhomeonline.com/photo

Thanks in advance for your help!
Mark


mtbiker

Never mind, I figured it out.  Don't know how I missed the {CART_MENU} the first time thru reading all the posts.

Thanks again for a great plugin Stramm!

Fabricio Ferrero

Hi Stramm,

I read the whole thread (honestly very quickly) and I think that one answer that some spanish member ask hasn't been asked yet...

Is it possible to put only some category on sale and avoid the rest? This member wants to install the plugin but he said he don't want to sell all the pictures on the gallery but some of them.

Thanks ;)
Read Docs and Search the Forum before posting. - Soporte en espaƱol
--*--
Fabricio Ferrero's Website

Catching up! :)

Stramm

First post: ;)
QuotePer Album Settings:
If you do not want global prices for all items, then you have the possibility to set different prices for each album or to disable the shop for certain albums.
For that check in the shops config the 'Per Album Settings'. If you set as price 0.00 for an item in the per album settings, the this item won't show in the dropdown anymore.

So you can't exclude categories but you can exclude certain albums.