Recurring tasks

Open to all! Ask other shopowners for help.
Fiber
Contributor
Posts: 173
Joined: Mon Oct 26, 2020 12:16 pm
Phoenix Version: v1.1.0.6
Has thanked: 17 times
Been thanked: 27 times

Re: Recurring tasks

Post by Fiber »

Kofod95 wrote: Thu Nov 23, 2023 7:47 pm Do you have the script in the source-code, @Fiber? And are there any errors in the browser log?
===
Assume you mean browser source code?

<script>
$(function () {
$('[data-toggle="popover"]').popover({
container: 'body',
trigger: 'hover click'
})
})
</script><script>
var xmlHttp;
function completeTask(id){
var task = document.getElementById("task-"+id);
task.style.opacity = (
task.style.opacity == "0.2" ? "1" : "0.2");
task.style.textDecoration =(
task.style.textDecoration == "line-through" ? "none" : "line-through");

xmlHttp = new XMLHttpRequest();
if(xmlHttp==null) {
alert("This will not work on this browser");
return;
}

var url="tasks.php?action=check&task_id="+id;
xmlHttp.open("GET",url,true);
xmlHttp.send();
}
</script><script>
$(function () {
$('[data-toggle="tooltip"]').tooltip()
})
</script>

No errors in console see screen
Image

===

I'm using PhoenixCart 1.0.8.20 on Chrome Version 119.0.6045.160 without any trouble with any of the positions.

Same version here


Turn up the Max

Tags:


Join The Code Co-op to get access to your library in the Code Co-op Forum
Fiber
Contributor
Posts: 173
Joined: Mon Oct 26, 2020 12:16 pm
Phoenix Version: v1.1.0.6
Has thanked: 17 times
Been thanked: 27 times

Re: Recurring tasks

Post by Fiber »

@Kofod95
Just reinstalled 10821 with only your addon, the previous install contained a number of things that I wanted to exclude, when I reinstall I have an install folder with things as I want to see them, including a hook with focus first element in admin/login (Which in my opinion shouldn't matter, but I'm just a hobbyist :-)) and a number of other things, so that is now completely out of the question...

But still the same unfortunately... I can't put my finger on it, so strange that it doesn't work for me again :-)
Turn up the Max
Fiber
Contributor
Posts: 173
Joined: Mon Oct 26, 2020 12:16 pm
Phoenix Version: v1.1.0.6
Has thanked: 17 times
Been thanked: 27 times

Re: Recurring tasks

Post by Fiber »

Just did an online install and now it's getting very strange, it doesn't work there either, would you almost say it's on this side? But how?
Turn up the Max
User avatar
Kofod95
Senior Contributor
Posts: 748
Joined: Sat Feb 06, 2021 7:38 pm
Phoenix Version: 1.0.8.20
Has thanked: 99 times
Been thanked: 179 times

Re: Recurring tasks

Post by Kofod95 »

Can you try on your phone or another device?

I don't know if it's likely, but maybe your device/browser settings are strict.

Also, if you type the script in the console (just replace "id" with a number you have as an active task_id) does it then work?

//Daniel
I'm not smart, but sometimes even a blind chicken can find a corn.
Here are a lot of corns: Phoenix user guide
Fiber
Contributor
Posts: 173
Joined: Mon Oct 26, 2020 12:16 pm
Phoenix Version: v1.1.0.6
Has thanked: 17 times
Been thanked: 27 times

Re: Recurring tasks

Post by Fiber »

Kofod95 wrote: Fri Nov 24, 2023 12:10 pm Can you try on your phone or another device?

I don't know if it's likely, but maybe your device/browser settings are strict.

Also, if you type the script in the console (just replace "id" with a number you have as an active task_id) does it then work?

//Daniel
yes, that's a good one, haven't done it yet on the phone, but it's crazy now, not even on the phone, weird, what is this?

replace id with task_id done also in console does nothing (if I did it right)
Turn up the Max
User avatar
Kofod95
Senior Contributor
Posts: 748
Joined: Sat Feb 06, 2021 7:38 pm
Phoenix Version: 1.0.8.20
Has thanked: 99 times
Been thanked: 179 times

Re: Recurring tasks

Post by Kofod95 »

Fiber wrote: Fri Nov 24, 2023 12:44 pm replace id with task_id done also in console does nothing (if I did it right)
No, replace id with a number (a number that corresponds to an active task, so if you have the first task active, then replace id with 1)

//Daniel
I'm not smart, but sometimes even a blind chicken can find a corn.
Here are a lot of corns: Phoenix user guide
Fiber
Contributor
Posts: 173
Joined: Mon Oct 26, 2020 12:16 pm
Phoenix Version: v1.1.0.6
Has thanked: 17 times
Been thanked: 27 times

Re: Recurring tasks

Post by Fiber »

Kofod95 wrote: Fri Nov 24, 2023 1:39 pm No, replace id with a number (a number that corresponds to an active task, so if you have the first task active, then replace id with 1)

//Daniel
Id is 14, task is active and then? I don't think I quite understand what you mean..
But tomorrow is another day, I must go...thnx for your support so far
Turn up the Max
User avatar
Kofod95
Senior Contributor
Posts: 748
Joined: Sat Feb 06, 2021 7:38 pm
Phoenix Version: 1.0.8.20
Has thanked: 99 times
Been thanked: 179 times

Re: Recurring tasks

Post by Kofod95 »

Fair, I don't think I explained too well either.

What I want you to do, is to run the script directly in the console. Since you can see it when you view source, I want to find out if you can run the script itself.
So use dev-tools to find the id of a task (just to be 100% positive that it's the right number)
id.png
Copy the script into the console. Remove the "Return" after the alert. Remove the closing }. Replace "function completeTask(id){" with "var id = 1" - or whatever number you found earlier. Press enter.
console.png
I have pasted the script below, so you can insert that into the console. Just make sure to change id to an id of a task you are having shown in the dashboard-module.

Code: Select all

var xmlHttp;
var id = 1 //14 in your case.
	var task = document.getElementById("task-"+id);
	task.style.opacity = (
	  task.style.opacity == "0.2" ? "1" : "0.2");
	task.style.textDecoration =(
      task.style.textDecoration == "line-through" ? "none" : "line-through");
	
	xmlHttp = new XMLHttpRequest();
	if(xmlHttp==null) {
	  alert("This will not work on this browser");
	}
	
	var url="tasks.php?action=check&task_id="+id;
	xmlHttp.open("GET",url,true);
	xmlHttp.send();
What should happen is that the task should get a line through and opacity. Further, when you refresh the page, the task should be gone, as it should now read "1" in task_done in the db.
If none of these happen, let me know.
If some of these happen, let me know which.
If all happen, I misunderstood the problem :D

//Daniel
You do not have the required permissions to view the files attached to this post.
I'm not smart, but sometimes even a blind chicken can find a corn.
Here are a lot of corns: Phoenix user guide
User avatar
Kofod95
Senior Contributor
Posts: 748
Joined: Sat Feb 06, 2021 7:38 pm
Phoenix Version: 1.0.8.20
Has thanked: 99 times
Been thanked: 179 times

Re: Recurring tasks

Post by Kofod95 »

Version 1.0.4 uploaded with small changes:
-Default width of dashboard-module changed to '6'
-Collate in db-install is now set to utf8mb4_unicode_ci so it doesn't just use the db's default

//Daniel
I'm not smart, but sometimes even a blind chicken can find a corn.
Here are a lot of corns: Phoenix user guide
Fiber
Contributor
Posts: 173
Joined: Mon Oct 26, 2020 12:16 pm
Phoenix Version: v1.1.0.6
Has thanked: 17 times
Been thanked: 27 times

Re: Recurring tasks

Post by Fiber »

Kofod95 wrote: Fri Nov 24, 2023 9:06 pm What should happen is that the task should get a line through and opacity. Further, when you refresh the page, the task should be gone, as it should now read "1" in task_done in the db.
If none of these happen, let me know.
If some of these happen, let me know which.
If all happen, I misunderstood the problem :D

//Daniel
Thank you for your explanation, done as you described, see screens, everything happened as you described.

Before
Image

After
Image

Refresh
Image
Turn up the Max


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply