Shopping cart - Page 25 Shopping cart - Page 25
 

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

Shopping cart

Started by Stramm, June 04, 2006, 09:02:32 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Gephri

#480
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

Stramm

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

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!

Gephri

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?

Stramm

Make a screenshot and mark what you mean

Gephri

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

Gephri

Stramm - can you see the screen shot?

Stramm

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)

Gephri

yup - thanks Stramm!

oderycke

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

JohannM

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

Stramm

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

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

oderycke

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

Stramm

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 ...

Stramm

Quote from: oderycke 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.

Thanks, good work

oderycke

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

tinorebel

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

Choobie

#498
Quote from: Stramm on November 02, 2007, 10:33:29 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:

//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!)

wuschel_lux

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