Bold Message

hotnet107

No avatar

2010-05-24 11:30

Dear all..

anyone know , in admin mode..especially "pending order"...
How to make the new order message is signed by the bold text.
and I know that unread message..( like email ).

thanks before

» Quick.Cart v3.x

boboo

Avatar: boboo

2010-05-24 11:44

I solved this as follows:

In the file /core/orders-admin.php
in the function: listOrdersAdmin
you'll find the lines:
if( $aData['iStatus'] == 1 )
$aData['sStatus'] = '<b>'.$aData['sStatus'].'</b>';

Now you add/repeat the the if-statement varying numbers (values) of status, additionally you can format the words (pending, realised, canceled etc.) with colors:
$aData['sStatus'] = '<font color=red>'.$aData['sStatus'].'</font>';
or another text formating tags.

boboo

Avatar: boboo

2010-05-24 12:55

I suppose now, you wanted something other.
Just an "automatic mechanism" that changes the status "pending" to "pending-but-read" in the admins list of orders, after klicking (read) on it. Without the manually "changing-status" work.
Is that right?

If yes, please contact me
(http://skupienie.kimla.de/?kontakt,2)
I have solved the problem.

hotnet107

No avatar

2010-05-25 06:08

Thanks Boboo..

I've realized about that...
I'll contact u..

boboo

Avatar: boboo

2010-06-15 13:39

So, 3 weeks and no contact.
I present here the solution, I made, for the following feature of orders-list in admin-panel.
The feature: the new incoming order has the status "pending" and this word (pending) is shown in red and bold font. All other statuses are only red without bold. After opening such new&pending order, its status should be still "pending" but not more bold - like an e-mail in Outlook - after you have read it, the letters are not more bold. Automatically.

1. First step you have to do is to add a new entry in /lang/en.php (or/and pl.php, or/and another xy.php [xy - languages you have in there]):
$lang['Orders_read'] = "Read or Przeczytane or Gelesen or whatever you want to see in the status-choose-field";
After this find the function:
throwStatus( ... ) in /core/orders.php
Add a new status into it:
$aStatus[5] = $lang['Orders_read'];
After this step you will be able to see the new status and change the order-status to the new one. But manually and the status name is "read" and not "pending". Becauce of this, we go to the next step.
2. Open the /core/orders-admin.php and find the function:
function listOrdersAdmin( ... )
and in this function find the entry:
if( $aData['iStatus'] == 1 ) {
$aData['sStatus'] = '<b>'.$aData['sStatus'].'</b>';
}
under this entry put a new one:
if( $aData['iStatus'] == 5 ) {
$aData['sStatus'] = $lang['Orders_pending'];
}

This is the trick to show the "pending" though the status is a "read" one. As you can see, there is no more <b> tag (bold).
Now, if you change the status (still manually) from "pending" to "read" you will see in the list "pending" but not more in bold.
OK, the manually part is over, now we go to the automatics.
3. The automatics should change the status to "read" after opening order. Clicking on the order in the list triggers the function:
throwOrder( ... ) in /core/orders.php
In this function find the line:
if( isset( $aData ) ){
and add under it:
if( $aData['iStatus'] == 1 ){
if( isset( $_SESSION['bUserQCMS'] ) && $_SESSION['bUserQCMS'] === true ){
$aData['iStatus'] = 5;
$oFF->save( DB_ORDERS_STATUS, Array( 'iOrder' => $aData['iOrder'], 'iStatus' => $aData['iStatus'], 'iTime' => time( ) ), null, 'rsort' );
$oFF->save( DB_ORDERS, $aData, 'iOrder', null );
}

Explanation-IMPORTANT:
This, what you see in brackets: $_SESSION['bUserQCMS'] you must take from
admin.php
from the line:
loginActions( $p, 'bUserQCMS', 'container.tpl' );
In my version I have 'bUserQCMS', in other versions of QC I found another strings.
It is important because the function throwOrder is triggered as well, when an user is adding the order. And this isset($_SESSION(...)) is checking whether he is logged in as an admin. If not, so the status will NOT be changed. Only if admin triggers this function, the code for changing status will be run.
Nearly perfect ;-) but not ready yet.
Because if you want to filter/show only the pending orders, the "read" ones will not be shown. Their status has number 5, and not 1.
For solving this we prepare/modify two functions in the: /core/orders-admin.php
listOrdersAdmin( ... )
find the line:
$aOrders = $this->generateOrdersSearchListArray( $GLOBALS['sPhrase'], $GLOBALS['iStatus']);
and change it to:
$aOrders = $this->generateOrdersSearchListArray( $GLOBALS['sPhrase'], $GLOBALS['iStatus'], $GLOBALS['iStatusa'] );

and in the function:
function generateOrdersSearchListArray( $sPhrase, $iStatus ){
add parameter $iStatusa, so the function will be now called:
function generateOrdersSearchListArray( $sPhrase, $iStatus, $iStatusa ){
and in this function find the line:
if( isset( $iStatus ) && $iStatus != $aData['iStatus'] ){
and change it to:
if( isset( $iStatus ) && ( $iStatus != $aData['iStatus'] && $iStatusa != $aData['iStatus'] ) ){

OK, we have expanded the function with one parameter and now we have to trigger the function with this additional parameter - therewith the "pending" and "read" ordes will be shown/filtered as "pending" ones.
4. In /templates/admin/container.tpl
find the line:
<a href="?p=orders-list&amp;iStatus=1">$lang['Orders_pending']</a>
and change it to:
<a href="?p=orders-list&amp;iStatus=1&amp;iStatusa=5">$lang['Orders_pending']</a>

Voila, fertig :-)

I hope, this was, what you have been looking for.

http://skupienie.kimla.de/?software-quickcart,106

hotnet107

No avatar

2010-06-17 10:03

sorry boboo..

I am doing another page first...
especially for contact form. ( making in iFrame )..

you're a great man....
detail and I think it's a difficult script for me...

thankyou very much....

boboo

Avatar: boboo

2010-06-17 18:57

hotnet,
:-)
a contact form you can find on my site as well.

http://skupienie.kimla.de/?software-quickcart,106

hotnet107

No avatar

2010-06-25 10:14

Dear Boboo...

I've seen and explored to your web..

So completly ....like "komentarze"...

How do i got the script like yours...free or paid....

unfortunetly your web in non-english languange...


thanks

boboo

Avatar: boboo

2010-06-25 11:51

I would say...
use the contact (kontakt) on my web site :-)
(on the right side of page is english :D )
The comments for each article, I have ready as well.

Just contact me.
If You live in Europe and have a normal stationary telephon (not mobile), give me the number, I'll call You back (for the whole Europe wire-telephones I have the flatrate).

Which languages do You speak?
(me: PL, EN, DE, RU)

http://skupienie.kimla.de/?software-quickcart,106

hotnet107

No avatar

2010-06-29 08:14

Dear Boboo

I Speak EN

It's mean that I must buy your srcipt ?

boboo

Avatar: boboo

2010-07-02 23:09

No, it is not so with buying. But maybe You can do, what I can't.
"Exchanging skills and helps" is often better than money.

Back to top
about us | contact