Will pay for help with photo_shop Will pay for help with photo_shop
 

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

Will pay for help with photo_shop

Started by JohannM, September 10, 2009, 01:50:27 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

JohannM

Hi there

I added a field "tracking" to the cpg_shop database. The reason for this is that I integrated a tracking number system on my "admin" and "my_orders" pages.

At this stage I need to use PhpMyAdmin to add the tracking manually, which waist a lot of my time ...

My Orders and Admin page do show  the tracking number I added ...

I need help to add the litte script to photo_shop_admin page that will update/add the tracking number I allocate when I insert it in a text field and click on "go".

I am attaching a sample of the "Admin" page ...

JohannM

Hi there

I added a field "tracking" to the cpg_shop database. The reason for this is that I integrated a tracking number system on my "admin" and "my_orders" pages.

At this stage I need to use PhpMyAdmin to add the tracking manually, which waist a lot of my time ...

My Orders and Admin page do show  the tracking number I added ...

I need help to add the litte script to photo_shop_admin page that will update/add the tracking number I allocate when I insert it in a text field and click on "go".

I am attaching a sample of the "Admin" page ...

Joachim Müller

If you're ready to pay, then you shouldn't have posted on the free support board in the first place. Moving to paid support. Do as suggested in the sticky thread there. Respecting board rules might help as well (it's mandatory to post a link to your gallery no matter what). You have been told about board rules countless times - I'm fed up to have to remind you of them constantly, so this is your last warning before getting banned.

Joachim Müller

I just figured out that you double-posted and already have created an identical thread in the paid support board: yet another case of breaking board rules. I'm merging that other, identical thread with this one and then I'm banning you from posting for a week. Next ban will be permanent.

JohannM

Sorry about the double post ... I sometimes get "timeouts" from my ISP ...

Can you perhaps direct me ( post a link ) on where exactly I must put my request please !

Thanx


Joachim Müller

Quote from: Joachim Müller on September 10, 2009, 11:03:48 AMMoving to paid support. Do as suggested in the sticky thread there.
Deep link to that thread is sub-board rules, read first!. Read that thread, then do exactly as suggested on the sticky thread. Do so on this very thread of your own, i.e. post a link to your gallery, a budget and a schedule.

JohannM

I am from South Africa, my budget is a bit limited, but I am willing to offer US$ 50 for the person that can help me customise photo_shop_admin.php

I have been trying for almost three weeks now doing my own scripting, but with no luck.

My website ( www.youth-sport-fotos.com/2009/index.php )

I have added a button on the "Admin" page with this script:

<a style="font-family: Verdana; font-size: 7pt; font-weight: bold; border: 1px solid #666666; padding-left: 3px; padding-right: 3px; padding-top: 1px; padding-bottom: 1px" class="admin_menu" href="javascript:opentracking('http://www.youth-sport-fotos.com/2009/plugins/photo_shop/addtracking-form.php?oid=$oid')">ADD TRACKING NUMBER</a>

This will open a new form page called "addtracking.php"

<?php
//BEGIN OF CODING
$host="localhost"// Host name
$username="username"// Mysql username
$password="password"// Mysql password
$db_name="darabase name"// Database name
$tbl_name="cpg_shop"// Table name

// Connect to server and select database.
mysql_connect("$host""$username""$password")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");

// Get values from form
$oid='$_REQUEST[oid]';
//$tracking='$_POST[tracking]';


// Insert data into mysql
$sql="INSERT INTO $tbl_name (tracking) VALUES ($tracking) WHERE cd=1 AND oid ='$oid' AND status = '7' LIMIT=1";
$result=mysql_query($sql);

// if successfully insert data into database, displays message "Successful".
if($result){
echo 
"Successful";
echo 
"<BR>";
echo 
"<a href='insert.php'>Back to main page</a>";
}

else {
echo 
"ERROR";
}

// close connection
mysql_close();
?>


Secondly, the form page uses addracking.php to insert data "tracking" (which is a tracking number for photos mailed) to the database, using the specific "oid", based on WHERE cd=1 AND status=7 ( I have included a function paid &sent which works fine in spite of ticking "set paid" and submit the form, and then again "set sent" and submitting it one again.

The code for addracking.php

<?php

$oid
=$_REQUEST["oid"];
//$tracking=$_POST["tracking"];

echo <<<EOT
<html><body>
<table width="400" border="0" align="center" cellpadding="0" cellspacing="1">
<tr>
<td><form action="addtracking.php" method="post" \>
<table width="100%" border="0" cellspacing="1" cellpadding="3" \>
<tr>
<td colspan="2" bgcolor="#8AA5B5">
<p align="center"><font face="Verdana"><strong>INSERT TRACKING NUMBER FOR ORDER <?php "echo 
{$oid}"; ?>
</strong></font></td>
</tr>
<tr><br><br>
<td width="185"><b><font face="Verdana" style="font-size: 9pt">Tracking Number:</font></b></td>
<td width="198"><input type="text" id="tracking" name="tracking" /></td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="submit" name="Submit" value="ADD TRACKING NUMBER"></td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</body>
</html>
EOT;
?>




I am still stupid with php to get this working.


Alternatively, I added a "text field" on the left side of where you select the order status (paid, sent, not sent, not paid) to get rid of the two seperate pages I made.

<td align="left">ADD TRACKING NUMBER: <input type="text" name="tracking" value="{$tracking}" class="textinput" /> <input type="submit" class="button" value="{$lang_photoshop_admin['go']}" /></td>


The code for the function is:

function tracking($text, $tracking)
{
    $result10 = cpg_db_query("SELECT * FROM {$CONFIG['TABLE_SHOP']} WHERE oid=".$oid." AND cd=1 AND status='7'");
    $row = mysql_fetch_assoc($result10);
    $value10 = $tracking;
    cpg_db_query("UPDATE {$CONFIG['TABLE_SHOP']} SET `tracking` = '$value10' WHERE cd=1 AND oid ='".$oid." AND status='7' ");
    mysql_free_result($result10);
}




All my effords is in vain.

I think this could be an added value to a new release, I am sure many will fine this usefull.

Mods: I hope I am posting this now on the right tread.

Thanx


Joachim Müller


JohannM

Thanx.  Stramm did respond to me, but I can not find a way to respond to him.

Joachim Müller

Stramm needs to send you his email address or a messenger contact details if he wants you to respond, as we removed the ability of non-privileged forum users to reply to PMs (or send PMs in the first place). There's a dev-only posting that explains this; maybe Stramm has overlooked it and was not aware of the changes in the way the forum works.

Joachim