Russ Powers
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] Site comments showing on category and tag pagesThe solution to this issue is super easy. Just follow the steps below ??
1. Create a new file in your theme directory called woocommerce.php
2. Copy the code from your theme’s page.php file and paste it in the woocommerce.php file
3. now replace
get_template_part( 'loop', 'page' );
withwoocommerce_content();
4. Save woocommerce.php
That should remedy the issue, but I also recommend adding WooCommerce support to your theme by adding the following code to the end of your functions.php file:
function mytheme_add_woocommerce_support() { add_theme_support( 'woocommerce' ); } add_action( 'after_setup_theme', 'mytheme_add_woocommerce_support' );
Forum: Fixing WordPress
In reply to: Unknown storage engine 'InnoDB'Also you may use an FTP client to backup your wp-contents folder as this contains your themes, plugins, uploads, etc.
Forum: Fixing WordPress
In reply to: Unknown storage engine 'InnoDB'T0M-T0M,
It sounds like the WordPress installation is trying to install a new database over the existing database, this may be the cause of database errors. I recommend exporting all tables and data from your existing WordPress database using PHPmyAdmin. From there I would delete the database and the database user and start a fresh install. After you’ve installed WordPress, you can import the tables and data from your previous database into your new database using PHPMyAdmin.
If you need help, I may be able to assist you ??
I found a solution by programmatically adding and removing coupons based on the total number of items in the cart
Below is a snippet of the code I used in case anyone would like to try this out
add_action('woocommerce_before_cart_table', 'bundle_deal'); function bundle_deal( ) { global $woocommerce; $totalItems = WC()->cart->cart_contents_count; if ( $totalItems < 3 ) { WC()->cart->remove_coupon( '4 or more item bundle deal' ); WC()->cart->remove_coupon( '3 item bundle deal' ); } if( $totalItems > 2 && $totalItems < 4 ) { WC()->cart->remove_coupon( '4 or more item bundle deal' ); $coupon_code = '3 item bundle deal'; if (!$woocommerce->cart->add_discount( sanitize_text_field( $coupon_code ))) { } echo '<div class="woocommerce_message"><strong>Bundle Deal Applied!</strong></div>'; } if( $totalItems > 3 ) { WC()->cart->remove_coupon( '3 item bundle deal' ); $coupon_code = '4 or more item bundle deal'; if (!$woocommerce->cart->add_discount( sanitize_text_field( $coupon_code ))) { } echo '<div class="woocommerce_message"><strong>Bundle Deal Applied!</strong></div>'; } }
I’ve tried this plugin before but can’t get it to work the way I need it to. I have to deduct 20 from the cart if there are 3 of any item with any combination of variations. It can’t be deducted separately from each product. but then when a fourth item is added, 30 is deducted from the total. No more should be deducted until 6 items are in the cart, then 40 is deducted. when 7 items are in the cart, 50 is deducted. 8 items, 60. etc. etc.
I can easily program this logic, it’s just calling and returning the cart total I can’t get a handle on..
Forum: Fixing WordPress
In reply to: Unknown storage engine 'InnoDB'I also had to default some permalinks. One of the sites crashed completely and the database became corrupt, but within a short period of time HostGator restored a backup. So all’s good on my end ??
Forum: Fixing WordPress
In reply to: Unknown storage engine 'InnoDB'You’re welcome guys! We’ll keep this thread open for now in case any further updates or announcements are made ??
Forum: Fixing WordPress
In reply to: Unknown storage engine 'InnoDB'I just got off the phone with Crystal from HostGator. She confirmed that this is the result of a server issue on their end and that they are working on getting it fixed. I asked if there was an ETA on repairing their servers. She said that at this time, there is not. I also asked if there was any chance that anyone would loose data in the affected databases. She was unsure at this time because the extent of the issue is still unmeasured. I asked, “In the worse case scenario and this server crashes and data is lost, does HostGator have backups of the websites and databases to restore lost or damaged websites?” She said that HostGator does perform regular backups and have everything that is currently affected stored safely on a separate server. She also told me that we can monitor their progress by following the HostGator support forms. I’ve provided a link to the thread below.
https://forums.hostgator.com/oct-29-02-00-emergency-maintenance-t328219.html
Their last update is as follows…
Work is on-going at this time, the full resolution being much more time-consuming than we would prefer. Headway is being made however, with a large number of the affected servers having now been returned to normal functionality. Work will continue unabated until a full resolution is achieved. Further updates will be forthcoming.
Forum: Fixing WordPress
In reply to: Unknown storage engine 'InnoDB'This is definitely a HostGator problem. None of our websites are linked together, nor share the same niches or demographic so that eliminates the possibility of this being the result of a hack or hacker. Also one of the websites that crashed on my end is in production and has no plugins installed so it couldn’t be a plugin, malware, SQL injection issue. Also it seems to be hit and miss across my reseller account. Right now only three or four websites are affected. I’m on the phone with HostGator now waiting on a representative and I still have the live chat window open. I will keep everyone updated ??
Forum: Fixing WordPress
In reply to: Unknown storage engine 'InnoDB'websitewelcome.com is HostGator! I have a chat window open with them right now. Waiting for them to log on – the wait time is over 30 minutes so I’m assuming that others are probably having the exact same issues that we are.
Hopefully we get a quick resolve. Heatherplude, are you also hosting with HostGator?
Forum: Fixing WordPress
In reply to: Unknown storage engine 'InnoDB'Did your website’s just go down today?? Also who’s your hosting providers?? I’m hosting with HostGator. We should try to determine if this is a WordPress issue or a hosting issue since it’s database related.
Forum: Fixing WordPress
In reply to: Unknown storage engine 'InnoDB'I’ve found some support threads out there for this kind of database error. Someone suggested deleting the InnoDB log files in the mysql data directory (ib_logfile0 and ib_logfile1); this should cause the InnoDB to try and recover after restarting mysqld.
I’m going to give this a go on one of the websites. I’m also trying to contact my web host provider to see if I can get any assistance on that end. I’ll keep everyone updated on any findings or if I find a solution ??
Forum: Fixing WordPress
In reply to: Unknown storage engine 'InnoDB'This just happened to two WordPress websites I’m hosting as a reseller. Both are up-to-date installs of WordPress and are not linked together in any way.. When I exported my database, I received the following errors in the exported .sql file..
— ——————————————————–
—
— Table structure for tablewp_options
—
— in use(#1286 – Unknown storage engine ‘InnoDB’)
— in use (#1286 – Unknown storage engine ‘InnoDB’)— ——————————————————–
—
— Table structure for tablewp_postmeta
—
— in use(#1286 – Unknown storage engine ‘InnoDB’)
— in use (#1286 – Unknown storage engine ‘InnoDB’)— ——————————————————–
—
— Table structure for tablewp_posts
—
— in use(#1286 – Unknown storage engine ‘InnoDB’)
— in use (#1286 – Unknown storage engine ‘InnoDB’)— ——————————————————–
Forum: Plugins
In reply to: [LDD Directory Lite] Content above [directory] shortcodeYou might be able to loop page content within the home.php template file. Just do it above the section that creates the categories. If that doesn’t work you can always create a widget area within the home.php template file, reference it in you theme’s functions.php file and use a widget for the content.
Another thing you can try to do is create a page template for your theme and use <?php echo do_shortcode(); ?> below the page loop. ‘
I’ll test a couple different solutions and see if I can come up with more solid resolution ??
Forum: Plugins
In reply to: [LDD Directory Lite] Removing logo feature on listingsIf you want to remove the default thumbnail from a single listing but still want to keep the ability to show an image, replace the following code found in the single.php template
<div class="col-md-4"> <?php echo ldl_get_thumbnail( $post->ID ); ?> <?php ldl_get_contact_form(); ?> </div>
with the following code.
<div class="col-md=4"> <?php $thumbnail = ldl_get_thumbnail( $post->ID ); if ($thumbnail) { echo ldl_get_thumbnail( $post->ID ); } ?> <?php ldl_get_contact_form(); ?> </div>
What we did here was create a create a variable that is populated with the thumbnail information. We then created a condition that will only echo the thumbnail if the variable we created is populated.
I haven’t tested this and just thought it up off the top of my head so there is a chance it may still show the default thumbnail if the default thumbnail populates the variable. In that case, you can try the following.
<div class="col-md-4"> <?php $thumbnail = ldl_get_thumbnail( $post->ID ); if(false !== stripos($thumbnail, 'noimage.png')) { echo ldl_get_thumbnail( $post->ID ); } ?> <?php ldl_get_contact_form(); ?> </div>
I think this can be done in the category.php template as well.