wordpress,wordpress-plugin,shopping-cart,woocommerceRelated issues-Collection of common programming errors
j-man86
php wordpress
I am using the WP Alchemy class to add a metabox to a page editor. The page is called “videos”.On the videos page it’s easy to get the value of the meta box by placing the following code in my videos.php template:global $video_metabox;$videoID = $video_metabox->get_the_value(‘videoName’);What I want to do additionally is to get the value of the meta box on the videos page editor, but on a taxonomy template, taxonomy.phpI’ve tried the following code in my taxonomy.php template… the videos p
tcox
php wordpress eval shortcode
I have a string that may contain shortcodes such as “this is a string with [anyshortcode1] and this is [anyshortcode2]”. I want to display the string with the shortcodes running where they are placed. When I echo this string out, it doesn’t do the shortcodes, it just prints them out leaving them in brackets. I tried to fix this by using code like the following:$string_with_shortcodes = “this is a string with [anyshortcode1] and this is [anyshortcode2]”; $pattern = get_shortcode_regex(); preg_
jkhoffman
wordpress permissions memcached wpmu
I have a highly optimized WordPress multisite (WPMU) installation running on Amazon EC2, RDS, Nginx, PHP-FPM, APC, BatCache and Memcached.APC is only running at the PHP level, to cache opcodes, but I’m not using it for WordPress’s object cache. For that, I’m using BatCache+Memcached.All of this is running amazingly well, super fast under load, etc., but I just ran into an unexpected problem.I logged in as a test user, created a new blog, and when I logged into /wp-admin it told me I didn’t have
markh
wordpress wordpress-plugin-dev
I am attempting to validate fields on a custom post type in the admin panel Edit Post page.When the user clicks “Publish” I want to validate fields in the POST data, and change the post_status to “pending” if the data does not pass the tests. When this occurs, I’d also like to add errors to the page in the admin notices area.I’ve been trying this with an added hook to the “wp_insert_post” action which also saves our own data. I’m not certain of the order of operations, but I’m assuming that the
Parallel 2ne
php html wordpress
I am using short code to execute a video player in my page template but i also want to grab the URL from my custom theme options panel. This is the code I am trying and getting the error below. If i insert the video URL instead of my echo call then it works fine. Any Help would be much appreciated.<?php echo do_shortcode(“[KGVID]<?php echo $smof_data[‘home-page-video-url’];?>[/KGVID]”); ?>Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABL
Kenshi
php wordpress
<?php if ( is_home() ) {<?php if ( have_posts() ) : while ( have_posts() ) : the_post();?><div id=”post”><?php the_content(); ?></div><?php endwhile;?><?php endif; ?> } else if (is_page() ) {$category = get_post_meta($posts[0]->ID, ‘category’, true); } if ($category) { $cat = get_cat_ID($category); $paged = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1; $post_per_page = 4; // -1 shows all posts $do_not_show_stickies = 1; // 0 to show stickies $
Cezar
wordpress svn plugins tortoisesvn commit
My plugin got approved by WordPress, and I also got SVN repository URL. I checkout out the plugin with Tortoise SVN, copied my plugin files to trunk folder but when I am trying to commit it, I am getting the following error.Commit failed (details follow):At least one property change failed; repository is unchangedServer sent unexpected return value (400 Bad Request) in response to PROPPATCH request for ‘/!svn/txn/747084-g5of’I am new to SVN, am I doing it right? How to solve this issue?
Captain Ron
php wordpress
I’m using a WordPress Theme that doesn’t have the blog / latest post displaying on the homepage as normal.How do I add this feature back into the template? I want to display the number of posts where I can choose at the settings as default.I’m basically needing to discover the correct PHP snippet to plug into my theme’s template loop to activate the blog to display at homepage. My theme I’m working on must have it hidden or deleted.Maybe a better phrasing of the question could be: How can I add
Nofel
wordpress plugins hook
i m learning to develop plugin and i am getting error on activation saying The plugin generated 157 characters of unexpected output during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.i tried removing and and making a new one but same error. here is my code/* Plugin Name: Awesomeness Plugin URI: http://www.abc.com/my-work Author URI: http://www.abc.com/ Author: abc Description: Just a fun plug
j-man86
php wordpress count posts
I’m trying to use the following function from http://codex.wordpress.org/Function_Reference/count_user_postsfunction count_user_posts_by_type($userid, $post_type=’post’) {global $wpdb;$where = get_posts_by_author_sql($post_type, TRUE, $userid);$count = $wpdb->get_var( \”SELECT COUNT(*) FROM $wpdb->posts $where\” );return apply_filters(‘get_usernumposts’, $count, $userid); }But I get the following error:Parse error: syntax error, unexpected ‘”‘, expecting T_STRING in …/wp-content/themes/a
Hafiz
php linux file wordpress-plugin
HiI am having a strange error, I just downloaded a PHP file (this is a wordpress plugin file), when I did change and saved it in netbeans and then again uploaded. It says: Parse error: syntax error, unexpected ‘}’ in /home/dajewel1/public_html/wp-content/plugins/foxypress/inventory.php on line 1And when I again downloaded the file and opened, every thing was on first line.It seems that there is some Character encoding problem or new line character e.t.c. I am using netbeans so I think that can s
Thomas W.
wordpress wordpress-plugin parallels
I am working on a WordPress 3.8 site hosted by Parallels and uploaded via the plex panel.When I want to search,featured,popular,newest favorites a new plugin, I get an error message saying Warning: An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums. (WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.) in /var/www/vhosts/fi
user1147995
php wordpress wordpress-plugin
My wordpress Wp-admin login www.xxx.com/wp-admin/ is used to fine and working.But when I log in this time. I am facing with this issue.HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request.however, I can access this page www.xxx.com/wp-login.php but cant login. Any body has any idea with this issues . I do really appreciate for all suggestion . I have tried with php.ini file in /wp-admin/ folder by adding with this
PhpMyCoder
javascript wordpress e-commerce wordpress-plugin
can you help with this, here is the link:https://kidsdreamgym.com/products-page/cocoon-swings/cuddle-swingas you can see, when you click the big image it will do the lightbox effect. However the thumbnails arent behaving like that. Please help me. thanksPlugin use: Wp-ecommerce
john
php wordpress-plugin
I am setting up a website in wordpress. the site was done by someone else. After setting up the site / database I get the following error:Parse error: syntax error, unexpected $end in C:\Documents and Settings\user101\ Desktop\wordpress\wp-content\plugins\wp-301redirect\wp-301redirect.php on line 320line 320 is the very last line of wp-301redirect.php page. I looked up what 301redirect is and it is apparently a plugin. The wp-301redirect.php page I have is exactly what the plugin provides (zip
Mr.32
php wordpress wordpress-plugin
i have developed one wordpress-plugin and it users the post meta table after installation. but before installation the error come.and i can not have view of the wordpress-plugin because of the error.Error is,The plugin generated 7267 characters of unexpected output during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.this error comes when i install that plugin and plugin also not work because
Engr Zardari
php wordpress wordpress-plugin
i installed cyclone slider 1.3.4 plugin in wordpress site i followed each step and instruction from Herehttp://www.codefleet.net/cyclone-slider/but when i include short code which is [cycloneslider id=”my-slider”] enter code hereto my header page this error comes…Parse error: syntax error, unexpected ‘id’ (T_STRING), expecting ‘]’ in C:\wamp\www\store-to-shipPlease any one who can help me…
markzzz
php wordpress widget wordpress-plugin
I have installed the WordPress Calendar plugins, and I’d like (in some point of the page) add this plugins, without add the default Calendar to a widget and call this widget to the page (such as <?php dynamic_sidebar( ‘secondary-widget-area’ ); ?>).I mean, like to use SidebarEventsList() for the WP Events Calendar PluginsHow can I do it? Which method I need to call?Tried with <? {CALENDAR} ?>as the readme.txt says, but I get an error Parse error: syntax error, unexpected ‘}’
mr.musicman
php wordpress wordpress-plugin
I’m trying to add a trailing slash in file path. The follow code works fine, but when I add the trailing slash at the end of subdir, it generates Parse error: syntax error, unexpected T_STRING.Please guide me a little bit.Good code:add_post_meta($post_id, ‘_wow_photo’, trailingslashit($uploaddir[‘subdir’]) . $filename);Code with error:add_post_meta($post_id, ‘_wow_photo’, ($uploaddir[‘subdir’])trailingslashit . $filename);
Elmer Buckley
php wordpress-plugin
Got the following error during the plugin activationThe plugin generated 1 character of unexpected output during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.here is the code of that plugin http://pastebin.com/ZKrKQbPvAlso i can’t able to edit plugin content via wordpress plugin editor. When i click save it shows “headers already sent” error.
Community
php html session shopping-cart
I have a shopping cart which at the moment allows me to add products, remove products and with 1 product in the cart I can change its quantity.However if i have 2 products in the cart and I try to change the quantity of the first item the site crashes. It doesnt reload the page with the new quantity it just times out and you can no longer click on any other links on the website.The code to display the quantity is:<form action=”cart.php” method=”post”><input name=”quantity” type=”text” v
IndigoIdentity
php session-variables shopping-cart
Firstly, i’d like to say that i am building a cart feature for my website.I am having a problem with a simple script that i have created. Basically, a user enters a string of text, the text is then checked against mysql data, if a match is found then the results returned. This works fine… Now i want a user to be able to add a result to their “cart”. So i have come up with this simple script:Here is a shortened version of the html and a definition of the itemId variable:$pageContent = ” <div
Babak
asp.net database shopping-cart
I have a shopping cart stored in session which decreases quantities of items stored in database when user clicks purchase.If the user closes their browser before they have paid I want to return these quantities back into the database.I am doing this in the void Session_End(object sender, EventArgs e) event in global.asax but the item quantities are not increasing. I set the session timeout to 1 minute in the web.config and the session is indeed ending because if i sit there with a full shopping
Buhake Sindi
java database shopping-cart invoice
I am trying to implement a shopping cart web app like most newbies to javaee & hibernate..I went through many textbooks and still have doubts. I am hoping somebody here can help me correct my thinking.I implemented a Product class and a CartItem. A CartItem has a Product field and a quantity field. When user wants to buy a Product,he adds a CartItem to the cart.To model the user’s buy, I wrote an Invoice class with a set of CartItem objects. It also has a customer field. Now, I am a bit conf
Mat
android sqlite activity global-variables shopping-cart
I am making an Android app where I am implementing a Shopping Cart. When the user selects an item, it is added to his/her shopping cart/bag in the app. Once he/she adds an item, he’s presented with the menu again, where he can add more items. Now I want to know how do I save these items during the buying process. I mean the items that are being saved in the bag, how do I save them in my android app? Shall I use the Android SQLite database? or use putextra/getextra and navigate through activities
Ilegorika
ruby-on-rails shopping-cart editing
I’m trying to create a system similar to the functionality of an ecommerce system. A table is displayed with a list of products, with a text boxes for entering the desired quantity of each product. At the bottom of the table is a button to process the purchase, this should then create an Inventory record for each of the products with a quantity of more than 0, unless a record already exists for that customer, in which case it should increment it by the stated value.I have absolutely no idea how
user2055026
c# shopping-cart web-hosting
the shopping cart down again, is this because the hosting company provides new temp website feature?I do think it is hosting company play around the setting, the shopping cart is working again, and I didn’t change anything…. Is there any good reliable windows web hosting companies?can someone please help me? The hosting company drives me mad. My website and shopping cart were working fine couple days ago and the website is running fine in my local host, but my shopping cart has suddenly stopp
liam.burns
c# winforms list properties shopping-cart
I have this code to send it from Form1 to Form2:public partial class Form1 : Form {public ShoppingBasket myBasket = new ShoppingBasket();public Form1(){InitializeComponent();}private void editButton_Click(object sender, EventArgs e){int c = lstCart.Items.Count – 1;for (int i = c; i <= 0; i++){if (lstCart.GetSelected(i)){Form2 fm2 = new Form2();fm2.productNameTextBox.Text = myBasket[i].ProductName;fm2.quantityTextBox.Text = Convert.ToString(myBasket[i].Quantity);fm2.latestPriceTextBox.Text = C
Dana Bouchard
wordpress wordpress-plugin shopping-cart woocommerce
Updated WordPress to newest version and lost our Add to Cart Button. I’ve been searching everywhere for a solution and tried the ones I have found. We do not have a backup prior to updating unfortunately : /These are the errors that show in Chrome developer tools browser when on a page with missing button. GET http://lifefarout.com/wp-content/plugins/woocommerce/assets/js/jquery-cookie/jquery.cookie.min.js?ver=1.3.1 406 (Not Acceptable) lifefarout.com:51Uncaught TypeError: Object function (e,t){
lauthiamkok
php serialization pdo shopping-cart
I need to pass a PDO connection into a cart class from a controller,function __construct($connection) {$this->cart = new cart($connection); }but I think the problem is with serialize()public function render_page() {if (!isset($_SESSION[SESSION_CART])){$cart = $this->cart;}else {$cart = unserialize($_SESSION[SESSION_CART]);}$_SESSION[SESSION_CART] = serialize($cart); }I get this error,Fatal error: Uncaught exception ‘PDOException’ with message ‘Youcannot serialize or unserialize PDO inst
user3084340
php wordpress woocommerce
This question already has an answer here:Reference – What does this error mean in PHP?23 answersHi I’m getting this error message Parse error: syntax error, unexpected end of file in woocommerce.php on line 56, when I am trying to view my products in woocommerce. Here is the code for that file. Line 56 is the last line.”><div class=”container” role=”main”><div class=”row”><?php do_action( ‘__before_article_container’); ##hook of left sidebar?><div id=”content” class=”<?ph
Shankar Damodaran
php wordpress woocommerce
I keep getting the error below..Parse error: syntax error, unexpected ‘function’ (T_FUNCTION),expecting on line 319for the theme-woocommerce.php file. I have tried using numerous code checkers and none have found a problem on line 319 of the code. This is frustrating as I have not edited the code, rather have copied and pasted a section out and then repasted it into the editor. Having done that, my whole website now does not work. Can someone please help? I read something about Mac computers cha
Stony
php wordpress parsing syntax-error woocommerce
I am getting the following error once I add an item to my site’s cart, and try to load the carts page. Parse error: syntax error, unexpected T_DEC in /home/puppykis/public_html/wp-content/plugins/woocommerce/templates/cart/cart.php on line 96I am using WordPress with the WooCommerce plugin. The cart page was working fine, and all of a sudden started acting weird on me.Below is the code. I wasn’t sure how to add line numbers, but this is last snippet of code from the cart.php file. The last line
Zaid Iqbal
wordpress performance woocommerce
How to make my wordpress woocommerce website performance fast. My website is http://www.furniturehub.pk/. But it is loading too slow. I have also checked its performance which is 64/100. So how can i make it more FAST?
Francesca
php wordpress function woocommerce
I’m using Woocommerce in WordPress and am trying to add two pieces of code from their documentation to my functions.php fileSee here for the two pieces of code I want to add.I added the first to my file and it worked great. But add the second one and the entire site smashes, I assume because the functions.php file is so vital and there is a syntax error… but I can’t spot it, and this documentation comes from their site!This is what I have added:add_filter( ‘add_to_cart_text’, ‘woo_custom_cart_
kaiser
woocommerce
Im trying to get WooCommerce installed correctly so I can do a bulk import of a clients product database into this. Basically when I activate the WooCommerce plugin it causes the page editor javascript to die.I end up with the following JavaScript errorUncaught ReferenceError: switchEditors is not definedIm using the latest version of WooCommerce and the latest version of WordPress – both downloaded yesterday from the original sites not some other site that it could be damaged from.I’m also gett
Dana Bouchard
wordpress wordpress-plugin shopping-cart woocommerce
Updated WordPress to newest version and lost our Add to Cart Button. I’ve been searching everywhere for a solution and tried the ones I have found. We do not have a backup prior to updating unfortunately : /These are the errors that show in Chrome developer tools browser when on a page with missing button. GET http://lifefarout.com/wp-content/plugins/woocommerce/assets/js/jquery-cookie/jquery.cookie.min.js?ver=1.3.1 406 (Not Acceptable) lifefarout.com:51Uncaught TypeError: Object function (e,t){
Johannes Kuhn
jquery woocommerce
I am trying to add fly to cart animation to woocommerce plugin, in order to get this I have used the following codejQuery(document).ready(function(e){e(document).on(“click”,”.add_to_cart_button”,function(){var t=e(this);if(t.is(“.product_type_simple, .product_type_downloadable, .product_type_virtual”)){var cart = $(‘.widget_shopping_cart_content’); var imgtodrag = $(‘.event img’).eq(0);var imgclone = imgtodrag.clone().offset({top: imgtodrag.offset().top,left: imgtodrag.offset().left}).css({‘opac
MavBzh
php jquery wordpress woocommerce
I use cloudzoom script through the cloudzoom-woocommerce plugin to add a zoom feature on my woocommerce product pages. Everything works fine since it replaces easily the default fancybox script.I’ve then installed woothumbs, a third party plugin to manage image galleries on product variations. This plugin reload the main image and the thumbs when the user switch variations and then, a JS callback can be set to reinit Cloudzoom.I’ve made some modifications in the cloudzoom plugin file cloudzoom.p
Remy Sheppard
php jquery radio-button woocommerce
I’m having trouble converting the variation dropdowns into radio buttons a woocommerce enabled site. I’ve tried the answer found here but I can’t seem to make this solution work. I’ve also tried editing the code in the variable.php file.So far the most success is the second approach, editing the variable.php code and changing the tags to tags. The problem is the natural jQuery event isn’t triggered when the radio buttons are clicked.If any of you know a simpler way to convert the dropdowns to
Web site is in building