...

View Full Version : Small modification to be made, is this price right?



J1mmy
03-13-2007, 05:41 PM
I have a script which requires a minor modification to be made and I have been quoted 30/$60 for this modification to be done. The work will be done by the publisher themselves, so its a bit of a monopoly. Though, they are fine with myself altering it.

Well, its s checkout script, the section requiring mofdification is the discount part. Right now, the discount is applied to everything - the grand total. However, insted, I would like the discount to be only applied to one item through the checkout.

For eg, lets say, the script is for web hosting. First the customer selects the domain, then a package, then any extras, then checkout. So I would like this discount code to take affect on the web hosting price only - not the grand total as it is currently configured.

Here is the Code that needs to be editted:


<?php

$empty = mysql_db_query($db, "delete from table_discountlog where identifier='$my_session'", $connection);
check_mysql($empty);

# CHECK FOR ACCOUNT TYPE DISCOUNT

$query = mysql_db_query($db, "SELECT inddiscount from table_customers where username='$username'", $connection);
while ($row = mysql_fetch_array($query)) {
$inddiscount = $row["inddiscount"];
}

if($inddiscount > 0) { $first_discount = ($total_price/100) * $inddiscount; }

# CHECK FOR SET FEE DISCOUNTS
$query = mysql_db_query($db, "SELECT discount from table_discounts where type='Set Fee' and code='$discount'", $connection);
while ($row = mysql_fetch_array($query)) {
$set_discount_value = $row["discount"];
}

if($set_discount_value > 0) { $second_discount = $set_discount_value; }

# CHECK FOR PERCENTAGE DISCOUNTS
$query = mysql_db_query($db, "SELECT discount from table_discounts where type='Percentage' and code='$discount'", $connection);
while ($row = mysql_fetch_array($query)) {
$discount_value = $row["discount"];
}

if($discount_value > 0) { $third_discount = $total_price * ($discount_value/100); }

$total_discount = $first_discount + $second_discount + $third_discount;

# $total_discount = currency_format("%.2f",$total_discount);

if($total_discount > 0) {
$now = time();
$insert = mysql_db_query($db, "INSERT into table_discountlog (discount, identifier, added) VALUES ('$total_discount', '$my_session', '$now')", $connection);
}


?>

So, am I being ripped off for this alteration, or is it something I can do myself. I get help from you guys with :)

aedrin
03-13-2007, 06:06 PM
Although I'm not replying about the price (which sounds right I suppose, depending on the level of surrounding complexity), I've never seen tables prefixed with ... table.

Other than that this is bad quality code. Shell style comments, old mysql_db_query() statement, no error checking on queries.

Inigoesdr
03-13-2007, 11:10 PM
Removed

J1mmy
03-14-2007, 08:07 AM
Although I'm not replying about the price (which sounds right I suppose, depending on the level of surrounding complexity), I've never seen tables prefixed with ... table.

Other than that this is bad quality code. Shell style comments, old mysql_db_query() statement, no error checking on queries.

Thanks for your input.

If this is such a bad quality script I dont think he should be charging such a price. I mean, I but the whole script for a little bit more than what he charging for this work.

I just need to get this code modified!

GJay
03-14-2007, 11:15 AM
30 doesn't sound like a lot to me, I'd probably charge more :)
The guy is probably assuming about 30mins actual coding, another 15 in correspondence with you and then the remainder to cover the time eaten in correspondence with people that never led to anything.

aedrin
03-14-2007, 03:26 PM
Although you bought it for the same price, I'm guessing the person resells it often. So the comparison is not fair.

But yeah, judging from the quality that price shouldn't be more than 2 hours of work. If he is planning less than 2 hours, it's overcharging.

J1mmy
03-14-2007, 05:15 PM
But yeah, judging from the quality that price shouldn't be more than 2 hours of work. If he is planning less than 2 hours, it's overcharging.

2 Hours?!

No way - I received an email from him, and in it he was indirectly tell me it will take less than half and hour, but they charge a minimum of 30 + VAT

the-dream
03-14-2007, 05:54 PM
if its less than half an hour work to them you are getting ripped off. Big time.

J1mmy
03-14-2007, 06:22 PM
Its just a question of making the discount effect a different price, it shouldnt take that long.

If it cant be done here, I guess I have no other choice but to pay up.

Fumigator
03-14-2007, 06:33 PM
I'm not going to make the changes for you and cut the legs off a fellow professional programmer, sorry.

If you attempt the change yourself and get stuck, feel free to ask questions about what specifically you are struggling with.

60 bucks is completely reasonable for a custom script modification, regardless of how long it takes. You're not paying an hourly wage, you're paying for a specific enhancement.

the-dream
03-14-2007, 07:10 PM
I'm not going to make the changes for you and cut the legs off a fellow professional programmer, sorry.

If you attempt the change yourself and get stuck, feel free to ask questions about what specifically you are struggling with.

60 bucks is completely reasonable for a custom script modification, regardless of how long it takes. You're not paying an hourly wage, you're paying for a specific enhancement.

That is a point!

J1mmy
03-14-2007, 07:57 PM
This 'professional programmer' is not your friend. I also think he should be charging on the intensity of the work to be done, its just easy money...and we both know it.

But yes, any pointers would be nice - any suggestions on what I should be looking at for change?

I got this value out from the code:


($total_price/100)

I guess on that line the discount is being applied to the total price as the value shows. I dont know what value will point to the specific item.

Are there many things to change within this code to get the desired result?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum