hpwtexas
Forum Replies Created
-
Forum: Themes and Templates
In reply to: [Mantra] Increase columns on page presentationFantastic! Thanks, works nicely! Now, doing something like this with the admin/settings.php file would be wishful thinking, right?
Thanks again! this also helps answer another question I’ve been pondering! (Using “subdirectory theme files” with a child-theme)
Forum: Plugins
In reply to: [WooCommerce] Stock qty on catalog pages — variations show 0 in stockHUZZAH.
I was VERY close! found woocommerce/templates/single-product/meta.php, and borrowed some code. Changed that pesky line 4 to:
if ( $product->is_type( 'variable' )) {
Works GREAT. Here’s the final function (add to functions.php):// ----------------------DISPLAY SKUs AND QTY ON CATALOG PAGES function shop_inventory(){ global $product; if ( $product->is_type( 'variable' )) { echo '<div itemprop="productID" id="multi-sku">Part No. <br/><span>' . $product->sku . '</span></div>'; } else { echo '<div itemprop="productID" id="multi-sku">Part No. <br/><span>' . $product->sku . '</span></div> <div class="stock" ><span>' . $product->stock . '</span> in stock<small>(backorders allowed)</small></div>'; } }; add_action( 'woocommerce_after_shop_loop_item_title', 'shop_inventory' );Hope this helps somebody else too!
Forum: Themes and Templates
In reply to: [Mantra] Increase columns on page presentationAlright! I got it worked out. Not quite the way I wanted — but by god, it works. So, if anyone’s interested:
Looks like /admin/settings.php controls most of the ‘Mantra Settings’ panel. Open it up and ctrl+f for ‘frontcolumns’ .. if say, I want 9 total columns; change this line
$items = array ("0" ,"1", "2" , "3" , "4");
to:
$items = array ("0" ,"1", "2" , "3" , "4", "5" , "6" , "7" , "8", "9");
And duplicate this block of code for each column being added (and change every ‘4’ to a ‘5’, etc.):<div class="slidebox"> <h4 class="slidetitle" > <?php _e("4th Column","mantra");?> </h4> (...) </div>Not too bad so far. Save, then open /includes/theme-frontpage.php and ctrl+f for ‘column3’ .. this was the tricky part for me.. grab this block of code (which is for column 3):
<?php if($mantra_nrcolumns != '2') { ?> <div id="column3"> <a href="<?php echo esc_url($mantra_columnlink3) ?>"> <div class="column-image" ><img src="<?php echo esc_url($mantra_columnimg3) ?>" id="columnImage3" alt="" /> </div> <h3><?php echo $mantra_columntitle3 ?></h3> </a><div class="column-text"><?php echo do_shortcode ( $mantra_columntext3 );?></div> <?php if($mantra_columnreadmore) {?> <div class="columnmore"> <a href="<?php echo esc_url($mantra_columnlink3) ?>"><?php echo esc_attr($mantra_columnreadmore) ?> »</a> </div><?php } ?> </div>Copy and paste it after the block of code for column 4, for each additional column. Then change out the numbers beginning with the fourth column (which reads
nrcolumns == '4'in the first line) so that the first line now shows the previous column number:
<?php if($mantra_nrcolumns != '3') { ?>
and the rest of the block reflects the current column number. Then the last column is changed so that all numbers in this block reflect the last column number, and also change the != in the first line to == . So, the resulting snippet is:<?php if($mantra_nrcolumns != '2') { ?> <div id="column3"> <a href="<?php echo esc_url($mantra_columnlink3) ?>"> <div class="column-image" ><img src="<?php echo esc_url($mantra_columnimg3) ?>" id="columnImage3" alt="" /> </div> <h3><?php echo $mantra_columntitle3 ?></h3> </a><div class="column-text"><?php echo do_shortcode ( $mantra_columntext3 );?></div> <?php if($mantra_columnreadmore) {?> <div class="columnmore"> <a href="<?php echo esc_url($mantra_columnlink3) ?>"><?php echo esc_attr($mantra_columnreadmore) ?> »</a> </div><?php } ?> </div> (...) <?php if($mantra_nrcolumns != '7') { ?> <div id="column8"> <a href="<?php echo esc_url($mantra_columnlink8) ?>"> <div class="column-image" ><img src="<?php echo esc_url($mantra_columnimg8) ?>" id="columnImage8" alt="" /> </div> <h3><?php echo $mantra_columntitle8 ?></h3> </a><div class="column-text"><?php echo do_shortcode ( $mantra_columntext8 ); ?></div> <?php if($mantra_columnreadmore) {?> <div class="columnmore"> <a href="<?php echo esc_url($mantra_columnlink8) ?>"><?php echo esc_attr($mantra_columnreadmore) ?> »</a> </div><?php } ?> </div> <?php if($mantra_nrcolumns == '9') { ?> <div id="column9"> <a href="<?php echo esc_url($mantra_columnlink9) ?>"> <div class="column-image" ><img src="<?php echo esc_url($mantra_columnimg9) ?>" id="columnImage9" alt="" /> </div> <h3><?php echo $mantra_columntitle9 ?></h3> </a><div class="column-text"><?php echo do_shortcode ( $mantra_columntext9 ); ?></div> <?php if($mantra_columnreadmore) {?> <div class="columnmore"> <a href="<?php echo esc_url($mantra_columnlink9) ?>"><?php echo esc_attr($mantra_columnreadmore) ?> »</a> </div><?php } ?> </div>..and finally just below the last column there’s this confusing line:
<?php } } }?>
..if say, I now have a total of 9 columns, this line should be changed to have 8 closing curly braces:
<?php } } } } } } } }?>
Whew. Didn’t have any issues with layout or css surprisingly .. backend and frontend look pretty good so far. Id love to do this through my child theme somehow, but this works for now.Forum: Plugins
In reply to: [WooCommerce] How to rearrange tabs viewed with WoocommerceNote: If you have product reviews/comments disabled, the review tab will still be generated, without a label or content, which will look kinda wonky. I removed the line:
$tabs['reviews']['priority'] = 20;Thanks WeddingAlbumCafe, been looking for this!
Forum: Themes and Templates
In reply to: [Mantra] Increase columns on page presentationRaspberries.
Lol maybe I’ll just go with plan b — Been looking for a while to find a way to add my own html (not just shortcode) to the presentation page, and I dont mind editing php files to make the boss happy — I just cant seem to track down the “root” file for the presentation page that I want to edit. Thoughts?Forum: Themes and Templates
In reply to: [Mantra] Increase columns on page presentationThat post has literally nothing to do with the question..? (Personally, I’m running 3.5.1)
If you’re using WordPress 3.3 or newer you should be fine regardless of your Mantra version.
Forum: Themes and Templates
In reply to: [Mantra] Increase columns on page presentationI too would love to hear a solution on this!
..any authors/admins reading this?If I find anything I’ll try to remember to post it here!
Forum: Plugins
In reply to: [WooCommerce] A lot of wc sessions (?)Resolved!! Just finished running an update from 2.0.5 to 2.0.7, and there is now a new feature in Woocommerce > System Status > Tools, “Clear all sessions”(not listed on the dev log). Now instead of 2,000+ sessions, I only have what’s actually being used! I can only assume that little button was your idea, Mike — thanks for that, if you’re reading. Now I can sleep at night.
Forum: Plugins
In reply to: [WooCommerce] A lot of wc sessions (?)When I posted last wc_cleanup was ‘running’ and was ‘currently running’, so I had rerun the job , but that made no difference–however just a moment ago, I noticed that wp_update_themes was scheduled for last month and was ‘currently running’ — So I tried rerunning this job and this seemed to clean things up in my cron.. Here’s the new schedule:
wp_cache_preload_hook [] Next Run: 2013/04/08 19:48:23 (now) Non-repeating woocommerce_cancel_unpaid_orders [] 2013/04/08 20:10:35 (now) Non-repeating wp_scheduled_auto_draft_delete [] 2013/04/08 23:33:14 (2 hours 55 minutes) 86400 (1 day) wp_cache_gc [] 2013/04/09 00:00:00 (3 hours 21 minutes) 86400 (1 day) woocommerce_scheduled_sales [] 2013/04/09 05:00:00 (8 hours 21 minutes) 86400 (1 day) wp_version_check [] 2013/04/09 06:46:44 (10 hours 8 minutes) 43200 (12 hours) wp_update_plugins [] 2013/04/09 06:46:44 (10 hours 8 minutes) 43200 (12 hours) wp_update_themes [] 2013/04/09 06:46:44 (10 hours 8 minutes) 43200 (12 hours) woocommerce_cleanup_sessions [] 2013/04/09 07:03:41 (10 hours 25 minutes) 43200 (12 hours) yoast_tracking [] 2013/04/09 15:29:07 (18 hours 50 minutes) 86400 (1 day) wp_scheduled_delete [] 2013/04/09 18:46:52 (22 hours 8 minutes) 86400 (1 day) dbmanager_cron_repair [] 2013/04/11 17:49:56 (2 days 21 hours)Also notice now that the number of wc_session & wc_sesion_exp. entries has dropped from almost 30,000 to 4,000. Each time I refresh the page, this number varies by about 500..
Forum: Plugins
In reply to: [WooCommerce] A lot of wc sessions (?)Okay so there are now 29,840 of these fields! I haven’t seen any expire–is there anything at all I should do/try/look at? woocommerce_cleanup_sessions doesn’t look like its running right?
SOS!!
Forum: Plugins
In reply to: [WooCommerce] A lot of wc sessions (?)Thanks for getting back to me on this, Mike
Should there be so many fields there, though? I’ll start tracking a few of them to see if they expire–in the event that they don’t expire, though, is there anything I could do to address this issue? I read that wc handles php sessions differently in 2.0, so I *think* these 4,000+ fields could be related to the update?
Forum: Plugins
In reply to: [WooCommerce] A lot of wc sessions (?)4,000+ fields now. So I can say with *some* certainty, that these are login sessions — but they dont seem to be expiring properly? Bottom line is, I’m able to delete these fields–but I have no idea if I should. I’d really like to tho, lol.
Forum: Plugins
In reply to: [WooCommerce] Woo 2.0 disables my discount at checkout!!Yeah I know it’s not exactly the best way to do it — I’ll just have to work it out another way. Thanks though.
**While I have your attention, I have a much bigger issue, if you happen to have a moment to look at this thread: http://ww.wp.xz.cn/support/topic/a-lot-of-wc-sessions?replies=1
..I’m pretty certain it’s an issue that came out of a failed wc update I ranResolved. That was fun.
So here’s what happened:
I read this thread: http://ww.wp.xz.cn/support/topic/plugin-wordpress-seo-by-yoast-sitemap-is-blank-page?replies=18
(change site url settings; http, https, www, non-www, etc.)And you know what, if you have ssl then you needa be REALLY damn careful with what you put in those two fields. Ended up breaking the site for about five minutes. Resolved THAT problem by coming accross this thread: http://ww.wp.xz.cn/support/topic/changed-blog-url-cant-log-in-now?replies=12 which pointed me to this codex topic: http://codex.ww.wp.xz.cn/Changing_The_Site_URL#Edit_functions.php
So. Had to set my urls to: https//site.com
While I’d really rather not have the entire site on https, the sitemap works perfectly–and all my search results came back automagically. So no reason to whine here.Forum: Plugins
In reply to: [Jetpack - WP Security, Backup, Speed, & Growth] Unable to use CSS editor!Thanks for the quick follow-up! Sorry, though–think my login timed out or something. This IS resolved. What happened:
(hpwtx.com)
After making several backtracks and undoing a lot of what I thought could be the problem, I went over my .htaccess and uncommented a line back in (Rewrite on), and my css editor returned to normal. Hm.
To make sure that this was the problem, I went back in and commented that same line out, which ought to make the css editor get ‘stuck’ again, right?–no changes or errors in the css editor!
At this point I noticed that I had commented this line (rewrite on) because it was a redundant/duplicated line anyway. (I’ve been working on a separate issue redirecting/writing certain pages/urls, so I have quite a few commented lines)So I’ve been slowly un-un-doing everything from my earlier troubleshooting; checking to make sure the editor doesn’t have any issues as I bring everything back online. So far, so good.
Long story short: I have no idea wtf happened. Messing with htaccess fixed it, but htaccess did not appear to cause it in the first place. #facepalm.*PostScript: I’ve been putting off consolidating my css files for some time (don’t tell the boss), so there’s a fair bit of code in the ‘custom-css’ editor–could it get ‘stuck’ if it’s trying to load too much damn css?