Jump to content
Sign in to follow this  
WebIT

sidebar widgets overlab even with complete titles

Recommended Posts

WebIT

Even though there are titles on the widgets they overlap. http://www.capek9cardio.com/clients/ This is not really your issue, as it only happens with widgets below the e-commerce gold cart. HOeuV.png If anyone knows a potential fix for this, please advise. I could change from drag and drop, but I love how it matches the nav bar color. Thanks, Jason

Share this post


Link to post
Share on other sites
Kate

Hey Jason - It's not really that they're overlapping, but that they're contained within the shopping cart div/widget. Is there a way to list them separately? (What I mean is, are they available as individual widgets?)

Share this post


Link to post
Share on other sites
WebIT

they are all actually individual widgets. if i change the orger and put the gold cart last, they look normal: uACKX.png

Share this post


Link to post
Share on other sites
Kate

Oh, I see... In that case it's probably a markup issue. Did you run the site through a validator to see if there's any missing end tags? Or perhaps you could spot it just by looking at the source? EDIT: Just took a look again: it appears the end tag for the "shopping-cart" div isn't being generated.

Share this post


Link to post
Share on other sites
Kate

Hey Jason - The first thing I would check is what the source code looks like when that shopping cart div is last. (See if the end tag is being generated.) If it's not, then check the widget's PHP file to see if the end tag is in there.

Share this post


Link to post
Share on other sites
WebIT

Here is my cart php file. Do you see a missing /div? <?php function widget_wp_shopping_cart($args) { global $wpsc_theme_path, $cache_enabled; extract($args); $options = get_option('widget_wp_shopping_cart'); // exit('count: '.wpsc_cart_item_count().' hideonempty

'.print_r($options, true).'
'); if(($options['hideonempty']== 1) && (wpsc_cart_item_count() < 1)) return; if(get_option('show_sliding_cart') == 1) { if(is_numeric($_SESSION['slider_state'])) { if($_SESSION['slider_state'] == 0) { $collapser_image = 'plus.png'; } else { $collapser_image = 'minus.png'; } $fancy_collapser = ""; } else { if($_SESSION['nzshpcrt_cart'] == null) { $collapser_image = 'plus.png'; } else { $collapser_image = 'minus.png'; } $fancy_collapser = ""; } } else { $fancy_collapser = ""; } $title = empty($options['title']) ? __('Shopping Cart') : $options['title']; echo $before_widget; $full_title = $before_title . $title . $fancy_collapser . $after_title; echo $full_title; $display_state = ""; if((($_SESSION['slider_state'] == 0) || (wpsc_cart_item_count() < 1)) && (get_option('show_sliding_cart') == 1)) { $display_state = "style='display: none;'"; } $use_object_frame = false; if(($cache_enabled == true) && (!defined('DONOTCACHEPAGE') || (constant('DONOTCACHEPAGE') !== true))) { echo " <div id='sliding_cart' class='shopping-cart-wrapper'>"; if((strstr($_SERVER['HTTP_USER_AGENT'], "MSIE") == false) && ($use_object_frame == true)) { ?> <object codetype="text/html" type="text/html" data="index.php?wpsc_action=cart_html_page" border='0px'> <p><?php _e('Loading...', 'wpsc'); ?></p> </object> <?php } else { ?> <div class='wpsc_cart_loading'><p><?php _e('Loading...', 'wpsc'); ?></p> <?php } echo " </div>"; } else { echo " <div id='sliding_cart' class='shopping-cart-wrapper' $display_state>"; include(wpsc_get_theme_file_path("cart_widget.php")); echo " </div>"; } echo $after_widget; } function widget_wp_shopping_cart_control() { $options = $newoptions = get_option('widget_wp_shopping_cart'); if ( $_POST["wp_shopping_cart-submit"] ) { $newoptions['title'] = strip_tags(stripslashes($_POST["wp_shopping_cart-title"])); if ($_POST['wp_shopping_cart-hideonempty']) { $newoptions['hideonempty'] = TRUE; } else { $newoptions['hideonempty'] = FALSE; } } if ( $options != $newoptions ) { $options = $newoptions; update_option('widget_wp_shopping_cart', $options); } $title = htmlspecialchars($options['title'], ENT_QUOTES); echo "<p>nr"; echo " <label for='wp_shopping_cart-title'>"._e('Title:', 'wpsc')."<input class='widefat' id='wp_shopping_cart-title' name='wp_shopping_cart-title' type='text' value='{$title}' /></label> nr"; echo " <label for='wp_shopping_cart-hideonempty'>"._e('Hide Cart When Empty:')."<input id='wp_shopping_cart-hideonempty' name='wp_shopping_cart-hideonempty' type='checkbox' "; if ($options['hideonempty']) { echo " checked='checked' "; } echo "/></label>nr"; echo " <input type='hidden' id='wp_shopping_cart-submit' name='wp_shopping_cart-submit' value='1' />nr"; echo " </label>nr"; echo "</p>nr"; } function widget_wp_shopping_cart_init() { if(function_exists('register_sidebar_widget')) { $widget_ops['description'] = "Your most used tags in cloud format"; register_sidebar_widget('Shopping Cart', 'widget_wp_shopping_cart', $widget_ops); register_widget_control('Shopping Cart', 'widget_wp_shopping_cart_control'); $GLOBALS['wpsc_cart_widget'] = true; if(get_option('cart_location') == 1) { update_option('cart_location', 4); remove_action('wp_list_pages','nzshpcrt_shopping_basket'); } #register_widget_control('Shopping Cart', 'widget_wp_shopping_cart_control', 300, 90); } return; } ?>

Share this post


Link to post
Share on other sites
cmunns

I can't be too sure as there is a lot of code there but I think you just are missing a closing `

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×