Shopping cart - Page 16 Shopping cart - Page 16
 

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 2 Guests are viewing this topic.

Stramm

What thumbnail have you lost? Please post a link

davebursey

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

Lisaweb

Quote from: Stramm on May 15, 2007, 05:38:50 PM
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. 

Stramm

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

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

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


davebursey

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

Stramm

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

davebursey

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

davebursey

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

Freder

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

Stramm

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

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

chican0

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!

Stramm

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

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

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

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

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

Stramm

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

works great, thanks :-)