carver1g
Forum Replies Created
-
Never mind, it was the heartbeat control plugin causing problems.
Forum: Plugins
In reply to: [WC Fields Factory] Fatal Error, can’t activate pluginSounds like you need to upgrade your php to 5.6 or greater.
Forum: Plugins
In reply to: [WooCommerce] Buttons instead of a drop down menu.Another good one:
https://www.ads-software.com/plugins/wc-variations-radio-buttons/
Forum: Plugins
In reply to: [WooCommerce Cart Tab] Modifying plugin’s CSS with Child ThemeCopy what you want to modify from the cart tab css and paste it in your child theme’s css.
Here’s an example of my child theme’s css:
.woocommerce-cart-tab{
background-color: #FFF !important;
background-image: url(“data:image/svg+xml;charset=UTF-8,%3csvg version=’1.1′ xmlns=’https://www.w3.org/2000/svg’ width=’54’ height=’56’ viewBox=’0 0 26 28′ xml:space=’preserve’ class=’woocommerce-cart-tab__icon’%3e%3cdefs%3e%3clinearGradient id=’a’ x1=’5.961′ x2=’27.37′ y1=’11.796′ y2=’10.952′ gradientTransform=’matrix(1.0613 0 0 1.2004 -1.143 -2.2)’ gradientUnits=’userSpaceOnUse’%3e%3cstop stop-color=’%230f0′ offset=’0’/%3e%3cstop stop-color=’%230f0′ stop-opacity=’0′ offset=’1’/%3e%3c/linearGradient%3e%3c/defs%3e%3ctitle%3eshopping-cart%3c/title%3e%3cpath d=’M10 24c0 1.094-.906 2-2 2s-2-.906-2-2 .906-2 2-2 2 .906 2 2zm14 0c0 1.094-.906 2-2 2s-2-.906-2-2 .906-2 2-2 2 .906 2 2zm2-17v8c0 .5-.391.938-.891 1L8.797 17.906c.078.359.203.719.203 1.094 0 .359-.219.688-.375 1H23c.547 0 1 .453 1 1s-.453 1-1 1H7c-.547 0-1-.453-1-1 0-.484.703-1.656.953-2.141L4.187 6H1c-.547 0-1-.453-1-1s.453-1 1-1h4c1.047 0 1.078 1.25 1.234 2H25c.547 0 1 .453 1 1z’/%3e%3cpath d=’M5.842 6.923L7.776 17.01l16.923-1.884V6.862z’ fill=’url(%23a)’ stroke=’%23230000′ stroke-width=’1.129’/%3e%3c/svg%3e”);
background-repeat: no-repeat;
background-position: 3px -5px;}
.woocommerce-cart-tab__contents {
background-color: #008600 !important;
margin-bottom: -2px;
width: 23px !important;
height: 23px !important;
line-height: 20px !important;
//border: 2px solid #000;
color: #FFF !important;
font-weight: 700 !important;
}.woocommerce-cart-tab .woocommerce-cart-tab__icon {
position: absolute;
top: 48% !important;
left: 43% !important;
transform: translateX(-50%) translateY(-50%);
width: 50px !important;
}.woocommerce-cart-tab p{
font-family: helvetica, arial;
font-weight: 600;
font-size: 14px;
margin-left: 7px;
margin-top: 53px;
}Forum: Plugins
In reply to: [WooCommerce Cart Tab] Add EMPTY CART To Pull Out TabIf your still interested this is the way I did what I think you want.
In your functions.php
/** * Clear Cart for WooCommerce - goes in functions.php */ function woocommerce_clear_cart_url() { global $woocommerce; if( isset($_REQUEST['empty']) ) { $woocommerce->cart->empty_cart(); } } add_action( 'init', 'woocommerce_clear_cart_url' );
Next in your functions.php
/*create ajax action to clear cart*/ function my_custom_function(){ global $woocommerce; $woocommerce->cart->empty_cart(); } add_action('wp_ajax_empty', 'my_custom_function'); add_action('wp_ajax_nopriv_empty', 'my_custom_function');
Also in functions.php
/*add button to cart pull out*/ add_action( 'woocommerce_widget_shopping_cart_buttons', 'add_clear_cart_button', 20 ); function add_clear_cart_button() { ?> <a>?empty=empty-cart"><button class="btn fa-input2 btn fa-input" name="empty" id="btnclear" style="width: 100% !important; margin-bottom: 6px !important; margin-left: 0px !important;"><?php _e('Empty Cart','woocommerce'); ?></button></a> //you can use your own styles <style>.btn.fa-input2{ background-color: #C60C00; background: -moz-linear-gradient(top,#C60C00 0%,#000 100%); background: -webkit-linear-gradient(top,#C60C00 0%,#000 100%); background: -o-linear-gradient(top,#C60C00 0%,#000 100%); background: -ms-linear-gradient(top,#C60C00 0%,#000 100%); background: linear-gradient(to bottom,#C60C00 0%,#000 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#C60C00',endColorstr='#000',GradientType=0)); } .btn.fa-input2:hover{ opacity: .8; } </style> <?php }
Now you need to create a js file and enqueue it
jQuery(function($){ $('#btnclear').click(function(){ $.ajax({ url: '/wp-admin/admin-ajax.php', type: "POST", cache: false, data: {action: 'empty'} //action defines which function to use in add_action }); }); });
You can style the button any way you like. Hope this works for ya’.
- This reply was modified 5 years, 11 months ago by carver1g. Reason: missing backtic
Forum: Plugins
In reply to: [WooCommerce] Issue After Latest UpdateRight after “clear” => true insert ‘priority’ => 120
Should work.
Forum: Plugins
In reply to: [WC Fields Factory] Fatal Error, can’t activate pluginAfter line 359 which is:
$trimVal = trim($_value);
Add the following:
if( !empty( $trimVal) ) {
return true;
}Forum: Plugins
In reply to: [WC Fields Factory] Fatal Error, can’t activate pluginI had to change line 359 to the following:
`} else if( $_rule[“logic”] == “not-null” ){
$trimVal = trim($_value);
if( !empty( $trimVal) ) {
return true;
}`Hope this helps.
Forum: Themes and Templates
In reply to: [Storefront] Two scroll bars on My Account pageAs long as I know there is no problem with woocommerce or storefront, I’ll keep looking on my end for the problem. For now my fix works.
Worked with computers while in the Air Force during the Nam war. IBM punch cards for input. Too hot, too cold, too much humidity, too little humidity they would crash. Computers using tubes and the size of a building. Sometimes I can be easily baffled by the new technology!?
Thanks for all your help. Sometimes it isn’t easy to teach an old dog new tricks!
Forum: Themes and Templates
In reply to: [Storefront] Two scroll bars on My Account pageAm using the latest version of WP, woocommerce, and storefront. Have three different browsers I test on all the latest versions – FF, chrome, and opera. In all three browsers I have the same phenomenon. Tried the max height but still the double scrollbars.
As you could probably see, I’ve customized storefront quite a bit, so I tried the default storefront and still the same issue. Have disbled plugins but to no avail. But like I stated earlier, I can fix the problem by either filling the content area with more info or use bottom padding.
Really appreciate your help.
Forum: Themes and Templates
In reply to: [Storefront] Two scroll bars on My Account pageThis screenshot is before moving the pointer over the cart widget, you can see the double scrollbars on the right.
https://i32.photobucket.com/albums/d23/carver1g/storefront_zpscs6raugo.jpg
This screenshot is after the cart widget drop down is displayed, back to a single scrollbar.
https://i32.photobucket.com/albums/d23/carver1g/storefront1a_zpshvummptq.jpg
Like I said, if I give the content more height (padding-bottom) everything works fine. No double scrollbars.
Thanks
Forum: Themes and Templates
In reply to: [Storefront] Two scroll bars on My Account pageDon’t know whether to classify this as a fix, hack or both, but found a solution for the displaying of the double scrollbars. The div thing didn’t work but padding did. Since I am using a child theme, I copied dashboard.php to my child theme. I then added <p style=”padding-bottom: 500px”>. Anything less than 500px the double scrollbars appeared. Seems the height of the content is the determining factor in the double scrollbars issue.
Thanks again for your help
Forum: Themes and Templates
In reply to: [Storefront] Two scroll bars on My Account pageThanks Job for your reply. Tried the css and yes it pushed the buttons on the widget a ways down, but still have the two scroll bars showing on the my account page, until I pass my pointer over the widget. I noticed this also happens on the About Us page. I have very little info on the About Us page. Seems this only happens on pages with little info. Not happening on the Shop page or any other pages that are ‘full’.
Am going to try an experiment and create a div giving it a width and height and see if the two scroll bars appear on pages with little info. Will let you know what happens.
Thanks for your help.
Forum: Plugins
In reply to: [WC Fields Factory] Clone/repeat fields without inserted informationOK, I had to make adjustments in order for it to work with radio buttons and checkboxes.
In wcff-client.js after line 262 there needs to be two separate lines. One for text and textarea and the other for radio buttons and checkboxes:
cloned.find(“input[type=text], textarea”).val(”);
cloned.find(“input[type=radio],input[type=checkbox]”).removeAttr(“checked”);Now it works!
Forum: Plugins
In reply to: [WC Fields Factory] Clone/repeat fields without inserted informationIf you haven’t found a solution yet, this is what I did.
I edited wcff-client.js and right below line 262 I added this line:
cloned.find(“input[type=radio],input[type=text],input[type=checkbox], textarea”).removeAttr(“checked”).val(”);
Works quite well.