Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: 1 ... 12 13 14 15 [16] 17 18 19 20 ... 30   Go Down

Author Topic: Shopping cart  (Read 651988 times)

0 Members and 1 Guest are viewing this topic.

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Shopping cart
« Reply #300 on: May 15, 2007, 05:38:50 pm »

What thumbnail have you lost? Please post a link

davebursey

  • Coppermine newbie
  • Offline Offline
  • Posts: 15
Re: Shopping cart
« Reply #301 on: May 18, 2007, 12:37:36 pm »

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
Logged

Lisaweb

  • Coppermine newbie
  • Offline Offline
  • Gender: Female
  • Posts: 2
Re: Shopping cart
« Reply #302 on: May 20, 2007, 06:03:01 am »

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

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Shopping cart
« Reply #303 on: May 20, 2007, 10:07:01 am »

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

Lisaweb

  • Coppermine newbie
  • Offline Offline
  • Gender: Female
  • Posts: 2
Re: Shopping cart
« Reply #304 on: May 21, 2007, 01:20:35 am »

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. 

Logged

davebursey

  • Coppermine newbie
  • Offline Offline
  • Posts: 15
Re: Shopping cart
« Reply #305 on: May 21, 2007, 06:29:10 pm »

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
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Shopping cart
« Reply #306 on: May 21, 2007, 07:52:14 pm »

you can change the % in functions.inc.php, function photoshop_format_price
Code: [Select]
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
Code: [Select]

$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
Code: [Select]
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...

Code: [Select]
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

davebursey

  • Coppermine newbie
  • Offline Offline
  • Posts: 15
Re: Shopping cart
« Reply #307 on: May 22, 2007, 11:41:51 am »

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
Logged

davebursey

  • Coppermine newbie
  • Offline Offline
  • Posts: 15
Re: Shopping cart
« Reply #308 on: May 22, 2007, 12:21:26 pm »

Once again - sorted my silly little problem. Just a simple spelling mistake in the folder structure, sorry to bother you all.
Logged

Freder

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 8
    • Galerie Fotografii - Alfred Broda
Re: Shopping cart
« Reply #309 on: May 23, 2007, 02:04:21 pm »

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:

Code: [Select]
    $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:
Code: [Select]
    $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)...
« Last Edit: May 23, 2007, 04:24:06 pm by Freder »
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Shopping cart
« Reply #310 on: May 23, 2007, 02:42:18 pm »

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  ;)

Freder

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 8
    • Galerie Fotografii - Alfred Broda
Re: Shopping cart
« Reply #311 on: May 23, 2007, 03:01:26 pm »

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.
« Last Edit: May 23, 2007, 04:19:43 pm by Freder »
Logged

chican0

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 20
  • Soy Chicano!
    • SoyChicano Gente
Re: Shopping cart
« Reply #312 on: June 02, 2007, 03:08:42 pm »

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.
Code: [Select]
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...
Code: [Select]
$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!

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Shopping cart
« Reply #313 on: June 02, 2007, 03:31:34 pm »

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

chican0

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 20
  • Soy Chicano!
    • SoyChicano Gente
Re: Shopping cart
« Reply #314 on: June 02, 2007, 03:57:19 pm »

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)"


Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Shopping cart
« Reply #315 on: June 02, 2007, 04:46:49 pm »

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.

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Shopping cart
« Reply #316 on: June 08, 2007, 03:22:59 pm »

New version 1.3.5
- you now have the possibility to set shipping per item; customizable within the function (similar to the discount system).

housemeister

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 8
    • mister-foto.eu
Re: Shopping cart
« Reply #317 on: June 10, 2007, 01:07:00 pm »

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

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Shopping cart
« Reply #318 on: June 10, 2007, 06:01:35 pm »

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:
Quote
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

housemeister

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 8
    • mister-foto.eu
Re: Shopping cart
« Reply #319 on: June 10, 2007, 06:36:19 pm »

works great, thanks :-)
Logged
Pages: 1 ... 12 13 14 15 [16] 17 18 19 20 ... 30   Go Up
 

Page created in 0.044 seconds with 20 queries.