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]   Go Down

Author Topic: Photo Shop - My Orders: Calculation problems  (Read 7534 times)

0 Members and 1 Guest are viewing this topic.

JohannM

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 252
Photo Shop - My Orders: Calculation problems
« on: January 06, 2008, 02:13:47 pm »

Hi

The "Admin" and "My Orders" in the photo shop system does not calculate the correct amounts.

Any help ?

Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Photo Shop - My Orders: Calculation problems
« Reply #1 on: January 06, 2008, 02:40:57 pm »

plugins/photo_shop/photo_shop_checkout.php

find
Code: [Select]
$results2 = cpg_db_query ("INSERT INTO `{$CONFIG['TABLE_SHOP']}` (`oid`, `uid`, `cd`, `quantity`, `price`, `otime`) VALUES ('$order_id', '".USER_ID."', '1', '".($cd_counter['cd']+$cd_counter['photo'])."', '".(number_format(($picture_total+$cd_price[1]+$shipping_price-$discount),2))."', '$otime')");
replace with
Code: [Select]
$results2 = cpg_db_query ("INSERT INTO `{$CONFIG['TABLE_SHOP']}` (`oid`, `uid`, `cd`, `quantity`, `price`, `otime`) VALUES ('$order_id', '".USER_ID."', '1', '".($cd_counter['cd']+$cd_counter['photo'])."', '".($picture_total+$cd_price[1]+$shipping_price_calc-$discount_calc)."', '$otime')");

find
Code: [Select]
function photoshop_add_data($shop_data, $order_id){
global $CONFIG, $SHOP_CONFIG, $cd_price, $cd_counter, $discount, $shipping_price;
replace with
Code: [Select]
function photoshop_add_data($shop_data, $order_id){
global $CONFIG, $SHOP_CONFIG, $cd_price, $cd_counter, $discount_calc, $shipping_price_calc;

JohannM

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 252
Re: Photo Shop - My Orders: Calculation problems
« Reply #2 on: January 06, 2008, 03:58:56 pm »

Yet again, you are a star. Working nice.

Thanx a mil Stramm

Ho can I include the discount amount on the "My order" Page ?
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Photo Shop - My Orders: Calculation problems
« Reply #3 on: January 06, 2008, 05:26:57 pm »

it doesn't save the discount... it saves the price of each item and the total
-> total - sum prices = discount + shipping

mfaizalar

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 16
Re: Photo Shop - My Orders: Calculation problems
« Reply #4 on: March 20, 2008, 01:19:27 pm »

it doesn't save the discount... it saves the price of each item and the total
-> total - sum prices = discount + shipping

I'm having quite similar prob. Setting up 2 diff shipping cost for 2 diff places. But when it comes to total cost, the sum will pick up the highest cost between these 2 shipping costs. Any suggestion to fix this? Appreciate your help! ;)
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Photo Shop - My Orders: Calculation problems
« Reply #5 on: March 24, 2008, 09:10:26 pm »

it's coded that way... despite changing code there's mo way

JohannM

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 252
Re: Photo Shop - My Orders: Calculation problems
« Reply #6 on: July 27, 2008, 02:45:19 pm »

Hi Stramm

I just realized that the "My Orders" and "Admin" pages does not show the correct amounts.  The totals is wrong and the number format also.

What u think can be wring ? Please help !!!   Thanx in advance
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Photo Shop - My Orders: Calculation problems
« Reply #7 on: July 28, 2008, 10:17:56 am »

examples? Again with numbers > 1000 ??

JohannM

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 252
Re: Photo Shop - My Orders: Calculation problems
« Reply #8 on: July 28, 2008, 11:02:14 am »

Yes Stramm, numbers greater than 1000. I just can't figure it out, tried everything within my php knowledge.

Logged

JohannM

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 252
Re: Photo Shop - My Orders: Calculation problems
« Reply #9 on: July 28, 2008, 11:03:25 am »

Yes Stramm, numbers greater than 1000. I just can't figure it out with my php knowledge. Tried everything !
Logged
Pages: [1]   Go Up
 

Page created in 0.093 seconds with 20 queries.