Advanced search  

News:

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

Pages: 1 ... 21 22 23 24 [25] 26 27 28 29 30   Go Down

Author Topic: Shopping cart  (Read 652013 times)

0 Members and 1 Guest are viewing this topic.

Gephri

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 235
Re: Shopping cart
« Reply #480 on: April 23, 2008, 11:05:42 pm »

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
« Last Edit: April 24, 2008, 08:35:17 am by Gephri »
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Shopping cart
« Reply #481 on: April 24, 2008, 08:34:50 am »

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.

Gephri

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 235
Re: Shopping cart
« Reply #482 on: April 24, 2008, 08:44:12 am »

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!
Logged

Gephri

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 235
Re: Shopping cart
« Reply #483 on: April 24, 2008, 11:02:13 pm »

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?
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Shopping cart
« Reply #484 on: April 26, 2008, 06:55:09 pm »

Make a screenshot and mark what you mean

Gephri

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 235
Re: Shopping cart
« Reply #485 on: April 27, 2008, 07:26:21 am »

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
Logged

Gephri

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 235
Re: Shopping cart
« Reply #486 on: May 01, 2008, 07:56:47 pm »

Stramm - can you see the screen shot?
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Shopping cart
« Reply #487 on: May 01, 2008, 08:08:54 pm »

yes, can see it...
in photo_shop_checkout.php find
Code: [Select]
<td>{$item_id['id']}</td>
and replace {$item_id['id']} with the text you need (photobooks)

Gephri

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 235
Re: Shopping cart
« Reply #488 on: May 01, 2008, 08:47:12 pm »

yup - thanks Stramm!
Logged

oderycke

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Shopping cart
« Reply #489 on: May 02, 2008, 10:15:04 am »

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
Logged

JohannM

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 252
Re: Shopping cart
« Reply #490 on: May 06, 2008, 07:48:13 pm »

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
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Shopping cart
« Reply #491 on: May 06, 2008, 08:04:26 pm »

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.

oderycke

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Shopping cart
« Reply #492 on: May 09, 2008, 09:33:27 pm »

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
Logged

oderycke

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Shopping cart
« Reply #493 on: May 09, 2008, 09:39:28 pm »

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
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Shopping cart
« Reply #494 on: May 12, 2008, 02:16:03 pm »

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
Code: [Select]
while ($row = mysql_fetch_array($results)) {
if ($row['type']=='ship') {
$SHOP_CONFIG['ship'] = $row['price'];
}
    $SHOP_CONFIG[$row['id']] = $row;
}
with
Code: [Select]
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 ...

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Shopping cart
« Reply #495 on: May 12, 2008, 02:17:32 pm »

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

oderycke

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Shopping cart
« Reply #496 on: May 12, 2008, 02:49:57 pm »

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
Logged

tinorebel

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 87
  • live long and prosper!
    • www.tripodart.net
Re: Shopping cart
« Reply #497 on: May 13, 2008, 02:02:54 pm »

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
Logged
Live long and prosper!
www.tripodart.net

Choobie

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: Shopping cart
« Reply #498 on: May 16, 2008, 09:33:16 am »

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:

Code: [Select]
//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!)
« Last Edit: May 16, 2008, 10:17:57 am by Choobie »
Logged

wuschel_lux

  • Translator
  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 93
    • volleyball.lu - photo gallery & shop
Re: Shopping cart
« Reply #499 on: May 16, 2008, 10:38:17 am »

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

Error description:
- The thumb is not longer shown in the shopping cart.

My Testgallery could be found here:
- http://www.volleyball.lu/gallery

Can someone give me a hint? Thanks a lot in advance.

Regards, Francis
Logged
Pages: 1 ... 21 22 23 24 [25] 26 27 28 29 30   Go Up
 

Page created in 0.056 seconds with 20 queries.