Loading...
Copy code
Close
Permalink
Close
Please tell us why you want to mark the subject as inappropriate.
(Maximum 200 characters)
Report Inappropriate
Cancel
Private Message
From :
guest
To :
Subject :
Content :
Type the characters you see in the picture below.
Send
Cancel
From :
guest
To :
Subject :
Content :
Type the characters you see in the picture below.
Send
Update
Cancel
Feedback
Email ID
Subject :
Comments :
Send
Cancel
Private Message
Type the characters you see in the picture below.
Type the characters you see in the picture below.
Attach files
Desktop
Google Docs
Each Attachment size should not exceed 1.0 MB.
Max no of attachments : 3
Loading User Profile...
guest
Response title
This is preview!
Attachments
Publish
Back to edit
Cancel
(
)
Sign In
New to this Portal? Click here to
Sign up
You can also use the below options to login
Login with Facebook
Login with Google
Login with Yahoo
jQuery
Plugins
UI
Meetups
Forum
Blog
About
Donate
All Forums
Recent Posts
Log In
Search
jQuery
Search
jQuery Forum
Screen name:
Marvin
Marvin's Profile
3
Posts
6
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Ideas
Problems
Expanded view
List view
Private Message
Add two diffrent Products in Cart with jQuery in WooCommerce
[5Replies]
09-Apr-2016 08:22 AM
Forum:
Using jQuery
Hey everyone,im trying to add multiple products with just one Click to my WooCommerce Cart. This is my actually code:
jQuery("#button").click(function(e){
e.preventDefault();
addToCart(28,29,"Red");
return false;
});
function addToCart(p_id,v_id,a_name) {
jQuery.get('/wp/?post_type=product&add-to-cart='+p_id+'&variation_id='+v_id+'&attribute_color='+a_name, function() {
});
}
At least im able to add one product, but i would like to add some more of the addToCart()-Functions like:
addToCart(28,29,"Red");
addToCart(28,30,"Black");
addToCart(28,31,"Silver");
WooCommerce always only takes the last product in the cart. Has anyone an idea?
create a txt file with ajax and php
[4Replies]
24-May-2015 10:06 PM
Forum:
Getting Started
Hey everyone,
i want to write a Script which creates a txt file with some user entered variables.
The communication between the script and my HTML Document with ajax works fine.
But i have some problems with the creation of the file.
Maybe someone find a small mistake in my script...
<?php
<!-- SAVE POSTDATA PART-->
$content = "test without variables";
$savename = "test.txt";
$file = fopen($savename, "w");
fwrite($file, $content);
fclose($file);
echo $savename;
?>
And the JavaScript Part:
$("#mybutton").click(function(){
$.post("generate-txt.php",
{postname:name,postplc2:plc},
function(data){
top.location.href = data;
});
});
I always just get a 404 Error, because the Script can't create the file.
Thank you in advance!
top.location.href doesn't send the full URL
[5Replies]
16-May-2015 06:33 PM
Forum:
Getting Started
Hey
I want to write a function which reads out an entered URL from a input field and sends this URL as query string to the next site.
Here is my jQuery Code:
$(document).ready(function() {
$("#myform").on('submit',(function() {
var url = $("#user-url").val();
url = encodeURIComponent(url);
top.location.href = "index.php?application.php&url="+url;
}));
});
and the HTML Part:
<form form id="myform">
<input type="text" id="user-url"/>
<button type="submit" class="grey">Submit</button>
</form>
The Script redirects me to the following URL: index.php?
No trace of a query string or the "application.php"-File.
I hope someone can help me
Thanks in advance!
«Prev
Next »
Moderate user : Marvin
Forum