WooCommerce Redirect Link Adding Two Items To Cart At One Time Not One Item At One Time - redirect

I came from a post about the topic I am inquiring about.
Summary of problem:
The post states that in WooCommerce to add items to cart and then redirect your URL use this link and add in your own personal links.
http://yourdomain.com/your_custom_page/?add-to-cart=25
The link works on my site but it adds two items to the cart at once not one.
That is my problem any help would be much appreciated.
I am new to this community and want to respect it.
Thank you for taking the time to read this post.

Related

How to display total number of items new to view shopping cart?

So in a nut shell I have created a simple e commerce website using paypal add to cart buttons with no problems - Its only now I should of considered using an opencart source PHP/Mysql, but it's to late now as it's pretty much done. My question is, is how can I display the total number of items next to view cart? something like this (1) is there a simple way to do this? I'm really struggling to find an answer, is there a small piece of code I need to change in the view cart form? my website is here, there is no other problems. www.diva-wear.co.uk
Thanks.
There is not going to be anything you can do with the button code itself, but you can track what your buyer is adding to the cart. If you enable and use PHP sessions, this can be as easy as storing the count of items in a session variable that you display next to the cart button.
You can run something similar to this when someone adds an item to their cart.
<?php
session_start();
$_SESSION['items_count'] = $_SESSION['items_count'] + 1;

facebook comments widget - how to monitor latest comments?

I have over 10,000 pages on my website. I just created a php script to automatically integrate the facebook comments widget into each pages.
However, i was wondering if there is a way to monitor the latest comments added to my website so i don't have to browse through 10,000 pages to see the latest comments.
I am also wondering if i will be able to delete comments by other users ? How can facebook tell that i am the webmaster of the page ? If some user leave nasty comments on one of the pages i want to be able to delete them
Facebook's Graph API allows you to query for Facebook data, including comments. It's pretty easy to use but does require a bit of code to make web requests, parse JSON, etc. You can pass in filters, such as only wanting comments after a certain date, which makes querying for "new comments" simple.
The API will return all comments (even those deleted by you; afaik there is no way to tell whether a particular comment has been deleted). The results are returned in pages, so importing a lot of comments can take a bit (as you need multiple round-trips). Also, there is no way to use the API to delete posts - this has to go through the Facebook web pages (or some other means I don't know about).
The documentation pages are pretty exhaustive and will explain how to get started.
Hello if you want to add face book comment box in your website . then just go to face book plugin's and copy the comment box (CODE) .
now open your website admin penal . if your website created in blogger then go to layout . if in other setup. then go to plugin's . you see some layout hear add your code in (top down ) bar .
if you doesn't understand then 2nd way.
go to website and open your dashboard now go to website template . now edit the template .
now you see some codes in new tab . scroll down and put your cods in HTML Body place .
i think you understand : for more shahzebraza425#yahoo .com / www.megaphotocompetition .com /
www.shahzebraza .tk / www.wuwsoftware .tk

How to show facebook comments box multiple times on a page?

I have a page for a bakery site, and on the page, there will be a list of cakes. There will be a picture of the cake, followed by a comments box, to let people comment on that specific cake. Each cake will need to have its own set of comments, separate from each other.
But unless I'm mistaken, facebook comment plugin is linked to a page's url, and can't be shown multiple times?
Is there any way to show it multiple times per page, and to link it individually to each cake, so the comments don't mix up?
But unless I'm mistaken, facebook comment plugin is linked to a page's
url, and can't be shown multiple times?
It can be shown.Though it is linked with your site url,you always have the privilage of appending custom string after the ternerary operator in your URL.
Is there any way to show it multiple times per page, and to link it
individually to each cake, so the comments don't mix up?
The trick here is to make a url unique.
This can be done in various ways:
1)www.something.com#commentbox1
2)www.something.com?section=commentbox1
I am using this on my current website where there are more than 10 comment boxes:http://www.arrowlife.com/
In addition to unique anchor tags per product, you may also add the product ID in a query string such as www.yoursite.com?productID=44
In my case I was dynamically creating a div showing the product detail. It was also necessary to force the Facebook script to show the comment section using the FP.XFBML.parse command

How to setup redirects for a large number of posts

I am working on a major site migration for alpinezone.com . As part of that migration, I moved all the news articles from vbulletin into wordpress cms. The vbulletin articles were previousyl pulled out via a plugin called GARS.
In any event, I have 3400 news articles over the course of five years or so. They are presently in the following format:
news.alpinezone.com/12345
If the title of the news article was "Sugarloaf Sets World Record" then the new location will be
alpinezone.com/sugarloaf-sets-world-record/
Is there a way for me to automate creating the necessary redirects that take the title from the literal page 12345 and convert into a URL?
Finally; the additional trick is that since I did a VB upgrade the existing news articles no longer show up. So going to news.alpinezone.com/12345 won't show anything right now, you need to pull up the forum thread (which is typically hidden) by taking that identifier and going to http://forums.alpinezone.com/showthread.php?12345 to see the actual title. I can pull all this from the WP database, (since all the posts are from a user AlpineZone News).
Any ideas? I'm fairly new to this and the added complexity of subdomains is somethign I am trying to figure out. Thx!
you could make your own showthread.php file in the correct location it was previously located.
have it use the passed id, retrieve the associated record from your database.
Construct the new url by turning the title to lowercase and changing spaces to - and do a redirect via header('Location: new url here');

How do I post a query string to a form field?

I have a website with a link that says "Click here to claim your prize" and that link goes to a Sales Force catch all web-to-lead form (that multiple sites use and it has a site ID that I append to the URL so the data goes to the right account)
When a user clicks that link and goes to the form page a string (in this case it's the promo code "my prize") needs to be passed to that form page and placed in the comments form field.
My questions are how is this done, are there any tutorials you could point me to, and is there a better method for accomplishing this?
What I'm trying to avoid is having the link say "Click here to win a free prize! Must enter "My Prize" in the comments" and having the user manually enter the promo code.
Thanks muchly in advance for your help!
I've used a handy jQuery script in the past called preset.js, although the instructions are not that great it's fairly simple to implement, you may have to pick through his source code though.
This question may be better on stack overflow but I found this blog post which shows example code using php and cURL to post to the web-to-lead form
http://www.paulwest.co.uk/article.php/salesforce-form-integration-with-php
This is another post about pushing leads to salesforce with php
http://sim.plified.com/2009/02/13/pushing-leads-to-salesforce-with-php/
And one more for good luck
http://www.seobywebmechanix.com/salesforce-php-form-processor-curl-tutorial
Hope these help