Jump to content
Sign in to follow this  
zipper

[Contribution] Contact Alert mod. for OsC 2.2 ms2

Recommended Posts

********************************************

Support thread for Contact alert mod for OsC 2.2 MS2

********************************************

Description:

 

If you have some problem with alot of pending orders and the priority in witch they should be handeled,

then this is the contribution for you.

 

After installation you will se an image indicating when the order was last updated to a new status,

or with new information for the customer.

You can set the amount of days before the alerts, and the alert is set for two steps.

Default is 3 days, and 5 days.

 

See screendump at "http://www.sweclimb.se/interakt/contact_alert_mod_preview.gif" for a graphic view.

 

This can help you alot in hectic times with alot of pending orders.

It did the trick for me. :)

 

 

Zipper


"Those who say it can't be done should get out of the way of those who are doing it."

I will not always answer quick since I have alot of work at the moment.

My Contributions:

** Control New Products Mod

** Contact Alert Mod

Share this post


Link to post
Share on other sites

Hi Zipper !

 

first of all, thank you for this Contribution. It will give the order status a better overview :-)

 

No difficulties with the install.

 

Just this problem:

 

while order from yesterday are correctly marked,

green.gif = Order updated within 2 days.

 

and

 

orders from yesterday till 19.12.2004 are also correcty marked

red.gif = Order not updated for over 2 days.

 

happens that

 

orders from 7.12.04 till 27.06.04 are marked as

green.gif = Order = Order updated within 2 days.

 

even if

 

an order from 27.6.2004 ist correctly marked as

red.gif = Order not updated for over 2 days.

 

and all orders before

 

27.6.2004 are correctly marked as:

red.gif = Order not updated for over 2 days.

 

what did i made wrong ?

 

 

thank you for your help

 

sincerely

Roberto

 

 

********************************************

Support thread for Contact alert mod for OsC 2.2 MS2

********************************************

Description:

 

If you have some problem with alot of pending orders and the priority in witch they should be handeled,

then this is the contribution for you.

 

After installation you will se an image indicating when the order was last updated to a new status,

or with new information for the customer.

You can set the amount of days before the alerts, and the alert is set for two steps.

Default is 3 days, and 5 days.

 

See screendump at "http://www.sweclimb.se/interakt/contact_alert_mod_preview.gif" for a graphic view.

 

This can help you alot in hectic times with alot of pending orders.

It did the trick for me. :)

Zipper

Share this post


Link to post
Share on other sites

busonero ------>

 

I cant see the images you have posted. They seem to be protected with password.

 

I dont quite understand what you mean without the images.

 

Zipper


"Those who say it can't be done should get out of the way of those who are doing it."

I will not always answer quick since I have alot of work at the moment.

My Contributions:

** Control New Products Mod

** Contact Alert Mod

Share this post


Link to post
Share on other sites

Hi Zipper !

thank you fpr your reply.

 

sorry, but i can see the images in the post.

 

For understanding I just insert the - image name - instead of the - images itself -:

 

while order from yesterday are correctly marked,

green.gif green.gif = Order updated within 2 days.

 

and

 

orders from yesterday till 19.12.2004 are also correcty marked

red.gif red.gif = Order not updated for over 2 days.

 

happens that

 

orders from 7.12.04 till 27.06.04 are marked as

green.gif green.gif = Order = Order updated within 2 days.

 

even if

 

an order from 27.6.2004 ist correctly marked as

red.gif red.gif = Order not updated for over 2 days.

 

and all orders before

 

27.6.2004 are correctly marked as:

reg.gif red.gif = Order not updated for over 2 days.

 

Thank you for your help

 

Sincerely

Roberto

 

 

busonero ------>

 

I cant see the images you have posted. They seem to be protected with password.

 

I dont quite understand what you mean without the images.

 

Zipper

Share this post


Link to post
Share on other sites

Hi, I cant see the images either, I think its because you are linking to files which are placed in your admin directory of your which anything in there even images other people will need a password to access.

 

You need to copy the images into a folder on your server of your site which is not passworded and redo the link because at the moment they link to /admin/images.... and we need a password to see these because they are uploaded in that folder and anything placed in a folder is protected.

 

Regards Martin

Share this post


Link to post
Share on other sites

Hi Zipper, hi Martin,

 

well, they're only the green.gif and the red.gif i linked.

 

i'll try again without images, just with images name.

 

>

 

while order from yesterday are correctly marked,

green.gif = Order updated within 2 days.

 

and

 

orders from yesterday till 19.12.2004 are also correcty marked

red.gif = Order not updated for over 2 days.

 

happens that

 

orders from 7.12.04 till 27.06.04 are marked as

green.gif = Order = Order updated within 2 days.

 

even if

 

an order from 27.6.2004 ist correctly marked as

red.gif = Order not updated for over 2 days.

 

and all orders before

 

27.6.2004 are correctly marked as:

reg.gif = Order not updated for over 2 days.

 

<

 

 

red.gif = Order not updated for over 2 days.

 

green.gif = Order updated within 2 days.

 

 

Thank you for your help

 

Sincerely

Roberto

 

 

Hi, I cant see the images either, I think its because you are linking to files which are placed in your admin directory of your which anything in there even images other people will need a password to access.

 

You need to copy the images into a folder on your server of your site which is not passworded and redo the link because at the moment they link to /admin/images.... and we need a password to see these because they are uploaded in that folder and anything placed in a folder is protected.

 

Regards Martin

Share this post


Link to post
Share on other sites

Hi,

 

Thanks for this nice distrubution.

 

But I have a question, could somebody tweak this contrubution so that if the status is delivered give's a happy status?

 

Regards

 

Hi Zipper, hi Martin,

 

well,  they're only the green.gif and the red.gif  i linked.

 

i'll try again without images, just with images name.

 

>

 

while order from yesterday are correctly marked,

green.gif  = Order updated within 2 days.

 

and

 

orders from yesterday till 19.12.2004 are also correcty marked

red.gif = Order not updated for over 2 days.

 

happens that

 

orders from 7.12.04 till 27.06.04 are marked as

green.gif  = Order = Order updated within 2 days.

 

even if

 

an order from 27.6.2004 ist correctly marked as

red.gif = Order not updated for over 2 days.

 

and all orders before

 

27.6.2004 are correctly marked as:

reg.gif = Order not updated for over 2 days.

 

<

red.gif =  Order not updated for over 2 days.

 

green.gif = Order updated within 2 days.

Thank you for your help

 

Sincerely

Roberto

Edited by brightlaserlights

Share this post


Link to post
Share on other sites
Hi,

 

Thanks for this nice distrubution.

 

But I have a question, could somebody tweak this contrubution so that if the status is delivered give's a happy status?

 

Regards

 

Hi

The thing with the daycount of this script is that it counts ydays. That is the actual number of days since last 1/1.

 

Therefore there is a known issue if the yday number when the order was last updated is actually higher than the yday of todays date.

Thats why orders that was last updated like 21/11/2004 indicates a wrong alert since the yday count for that date is actually higher than todays date. (16/07/2005)

 

Please note that this script is to control pending orders and not closed ones.

When I made the script it was to remind me after 5 days at most.

The orders in the example in brightlaserlights post above is quite older than that.

 

I will try to mend this issue when I get the time though.

Stay with this version in the mean time. :)

 

Zipper

Edited by zipper

"Those who say it can't be done should get out of the way of those who are doing it."

I will not always answer quick since I have alot of work at the moment.

My Contributions:

** Control New Products Mod

** Contact Alert Mod

Share this post


Link to post
Share on other sites

Hi Zipper,

thank you for your reply.

 

i understand it. i cannot fix it myself, but maybe i'll have time to fix it in the next release.

 

thank you again for your work

 

sincerely

 

Roberto

Share this post


Link to post
Share on other sites
Hi,

 

Thanks for this nice distrubution.

 

But I have a question, could somebody tweak this contrubution so that if the status is delivered give's a happy status?

 

Regards

 

Hi, guys...

 

Thanx for this great mod... :thumbsup:

 

What brightlaserlights said seems to be a good idea...

We could also display a new (different) icon when order status is "delivered" ... ;)

Share this post


Link to post
Share on other sites

Hi yes I agree great contribution very usefull as trying to spot the different status can be a pain.

 

The idea of having completed orders with a smily face is great as all my orders which are done have sad red faces which seems a bit wrong :)

 

Great work though so far!

 

Martin

Share this post


Link to post
Share on other sites

Yep...

 

Just a small bug...

I'm checking my shop with this new mod installed and when a new order is recorded, before any update, green smily is displayed instead of warning icon...

:'(

Share this post


Link to post
Share on other sites

Maverick529 --->

That seems strange. When a new order is made the field last_updated_date gets the value null.

The script searches fot this value in the field before anything else happens, so the reason for this not working must be that the default value of that field in your database is not null. Can that be correct?

It's eiter that or something else. :)

 

--

Its a great idea with another icon for closed orders.

I will try to work on that later on. Probably not a biggie.

I have got limited time for coding like this, but I will get to it as soon as possible.

 

Feel free to help out if you have the knowhow and time.

 

Zipper

 

 

Ps.

busonero -----> Can you please edit your previous post and remove the linked images. They are behind admin and I (and everyone else?) is beeing prompt for password at every reload of the thread.

Thanks.


"Those who say it can't be done should get out of the way of those who are doing it."

I will not always answer quick since I have alot of work at the moment.

My Contributions:

** Control New Products Mod

** Contact Alert Mod

Share this post


Link to post
Share on other sites

Hi zipper

 

you right :thumbsup:

 

I was checking my Orders table and the field last_modified is not Null by default but displays the same date than date_purchased ...

I'm using a french creaload 6, not a ms2.2, may be that's the reason why...

 

I've tried to modify the code like that:

 

$last_mod_day = tep_date_yc($orders['last_modified']);

$purchase_day = tep_date_yc($orders['date_purchased']);

if($last_mod_day == $purchase_day) {

 

instead of

 

$last_mod_day = tep_date_yc($orders['last_modified']);

$purchase_day = tep_date_yc($orders['date_purchased']);

if($last_mod_day == null) {

 

but green icon is still diplayed...

What can I do?

;)

Share this post


Link to post
Share on other sites

ouups, I wasn't editing the right file, sorry :blush:

 

but now, with this code, warning icon is displayed for all order recorded and/or modified the same day (it doesn't care about the hour, only the date)...

:'(

Share this post


Link to post
Share on other sites

Found.... Thanx to my friend, Oneill :thumbsup:

 

It was a creload problem...

 

in checkout_process.php, we can find:

 

'last_modified' => 'now()',

 

Just remove it and it works... :thumbsup:

Share this post


Link to post
Share on other sites

Hi zipper

 

just a question

 

could you confirm to me this code is ok?

// contact alert mod start
$last_mod_day = tep_date_yc($orders['last_modified']);
$purchase_day = tep_date_yc($orders['date_purchased']);
if($last_mod_day == null) {
$indicator = 'images/alert/new.gif';
} else {
if($today - $last_mod_day >= $daycount_2) {
$indicator = 'images/alert/red.gif';
}
elseif($today - $last_mod_day >= $daycount_1) {
$indicator = 'images/alert/yellow.gif';
} else {
$indicator = 'images/alert/green.gif';
}
}
// contact alert mod end

 

It shouldn't be like that?

// contact alert mod start
$last_mod_day = tep_date_yc($orders['last_modified']);
$purchase_day = tep_date_yc($orders['date_purchased']);
if($last_mod_day == null) {
$indicator = 'images/alert/new.gif';
} else {
if($today - $last_mod_day >= $daycount_2) {
$indicator = 'images/alert/red.gif';
} else {
if($today - $last_mod_day >= $daycount_1) {
$indicator = 'images/alert/yellow.gif';
} else {
$indicator = 'images/alert/green.gif';
}
}
}
// contact alert mod end

 

Thanx for your answer ;)

Share this post


Link to post
Share on other sites

The correct lines of code is:

// contact alert mod start
$last_mod_day = tep_date_yc($orders['last_modified']);
$purchase_day = tep_date_yc($orders['date_purchased']);
if($last_mod_day == null) {
$indicator = 'images/alert/new.gif';
} else {
if($today - $last_mod_day >= $daycount_2) {
$indicator = 'images/alert/red.gif';
}
elseif($today - $last_mod_day >= $daycount_1) {
$indicator = 'images/alert/yellow.gif';
} else {
$indicator = 'images/alert/green.gif';
}
}
// contact alert mod end

 

It?s easy to see if the code has errors though. Most webservers tell you what is wrong and the line of the error in the file.

 

Zipper


"Those who say it can't be done should get out of the way of those who are doing it."

I will not always answer quick since I have alot of work at the moment.

My Contributions:

** Control New Products Mod

** Contact Alert Mod

Share this post


Link to post
Share on other sites

Is it possible for this contribution to be done without the issue of time.

 

Just to show a coloured face depending on the status an order regardless of how long it has been on the system?

Share this post


Link to post
Share on other sites
Is it possible for this contribution to be done without the issue of time.

 

Just to show a coloured face depending on the status an order regardless of how long it has been on the system?

 

Yepp. Thats no biggie.

You would have to add a few lines of code to the file orders.php and upload the images you want to be displayed.

 

There is a way of sorting orders by status from the dropdown meny in the right corner of the orders section as of now though.

 

Zipper


"Those who say it can't be done should get out of the way of those who are doing it."

I will not always answer quick since I have alot of work at the moment.

My Contributions:

** Control New Products Mod

** Contact Alert Mod

Share this post


Link to post
Share on other sites

Hi guys :D

 

here comes the solution, from the frenchie :lol: , to display an other icon for closed orders... B)

 

// contact alert mod start
$last_mod_day = tep_date_yc($orders['last_modified']);
$purchase_day = tep_date_yc($orders['date_purchased']);
if($last_mod_day == null) {
$indicator = 'images/alert/new.gif';
} else {
if($today - $last_mod_day >= $daycount_2) {
$indicator = 'images/alert/red.gif';
}
elseif($today - $last_mod_day >= $daycount_1) {
$indicator = 'images/alert/yellow.gif';
} else {
$indicator = 'images/alert/green.gif';
}
}
if ( $orders['orders_status_name']==$orders_status_array[3])
$indicator = 'images/icons/tick.gif';
// contact alert mod end

 

Check fist in your database if your orders_status_id is set to 3, like me, for closed order (sent order)

Else, change it accordingly to your id ($orders_status_array[your_id]

 

Enjoy B)

 

Thx to my firend pierrick for this code... :thumbsup:

Share this post


Link to post
Share on other sites
Hi guys  :D

 

here comes the solution, from the frenchie  :lol: , to display an other icon for closed orders... B)

 

// contact alert mod start
$last_mod_day = tep_date_yc($orders['last_modified']);
$purchase_day = tep_date_yc($orders['date_purchased']);
if($last_mod_day == null) {
$indicator = 'images/alert/new.gif';
} else {
if($today - $last_mod_day >= $daycount_2) {
$indicator = 'images/alert/red.gif';
}
elseif($today - $last_mod_day >= $daycount_1) {
$indicator = 'images/alert/yellow.gif';
} else {
$indicator = 'images/alert/green.gif';
}
}
if ( $orders['orders_status_name']==$orders_status_array[3])
$indicator = 'images/icons/tick.gif';
// contact alert mod end

 

Check fist in your database if your orders_status_id is set to 3, like me, for closed order (sent order)

Else, change it accordingly to your id ($orders_status_array[your_id]

 

Enjoy  B)

 

Thx to my firend pierrick for this code...  :thumbsup:

 

 

Great work Maverick and Pierrick!

Just one small addition.

Be sure to upload a small image called tick.gif to the images/alert/ folder.

 

I will make an update to this contibution with the changes ASAP.

 

Zipper


"Those who say it can't be done should get out of the way of those who are doing it."

I will not always answer quick since I have alot of work at the moment.

My Contributions:

** Control New Products Mod

** Contact Alert Mod

Share this post


Link to post
Share on other sites

Hi zipper

 

it wasn't 'images/alert/tick.gif' as you said..

But:

$indicator = 'images/icons/tick.gif';

 

This is an existing icon on my creload 6...

That's the reason why I choose it... ;)

Share this post


Link to post
Share on other sites

Hi,

 

I don't needed to upload any picture. I just overwrite the whole code from here, and I add this to the explaning list:

 

                  <img src="images/icons/tick.gif" alt=""> = Order shipped.<br>

 

Complete!

Edited by brightlaserlights

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×