Forum Replies Created

Viewing 10 replies - 1 through 10 (of 10 total)
  • Forum: Fixing WordPress
    In reply to: Comodo Trust Logo

    Open up your functions.php file and write this:

    function comodo(){ ?>

    <script type=”text/javascript”> //<![CDATA[
    var tlJsHost = ((window.location.protocol == “https:”) ? “https://secure.comodo.com/” : “http://www.trustlogo.com/”);
    document.write(unescape(“%3Cscript src=’” + tlJsHost + “trustlogo/javascript/trustlogo.js’ type=’text/javascript’%3E%3C/script%3E”));
    //]]>
    </script>

    <script language=”JavaScript” type=”text/javascript”>
    TrustLogo(“xxxxxxxxxxx “, “CL1”, “none”);
    </script>

    } <?php
    add_action(‘wp_footer’, ‘comodo’);

    I would have to guess in the process of transferring your site the path to reference the image has changed. Check that first.

    When you say, “adding a new post to the page” does that mean you are adding a new post to a blog page?

    How are you adding the media? Does the media upload properly in your media library or does it error out.

    This can be accomplished by editing the style sheet to shift the elements on the page around when viewed on different screen widths.

    The elements aren’t staying the size you expect them to because it is common practice to develop responsive websites using percentages of element sizes instead of fixed pixel widths (50% in comparison 400px).

    There are a couple different ways you could go about this.

    The two options I would choose are:
    1. create your own basic theme (here’s a good tutorial: https://www.siteground.com/tutorials/wordpress/wordpress_create_theme.htm)
    2. purchase a premium theme (I use X Theme for all my clients) and tweak the site out how ever you want.

    If you are concerned about site performance, the first option might be better for you.

    Nevermind, I figured it out. Thanks

    I was wondering if you could help me? I am trying to insert data into a custom table simply from a form post in the same file.

    Here is my code:

    add_action( 'admin_menu', 'calc_on_admin_menu' );	
    
    public function calc_on_admin_menu() {
    
    		//create new top-level menu
    		add_menu_page( 'Product Calculator', 'Product<br>Calculator', 'manage_options' , 'product-measurement-calculator', array( $this, 'calc_page_setup' ), plugins_url( 'js_product_calculator/admin/img/calculator.png' ) );			
    
    	}
    
    function calc_page_setup() {
    		global $wpdb;
    
    		if (isset($_POST['submit']) ) {
    			$table_name = $wpdb->prefix . 'WH_settings';
    			echo 'testing';
    
    			for($i=0;$i<3; $i++){
    			   $wpdb->insert(
    				   $table_name,
    				   array(
    					   'prod_cat' => 'banners',
    					   'sqft_from' => $_POST['bannerFrom' . [$i]],
    					   'sqft_to' => $_POST['bannerTo' . [$i]],
    					   'm_price' => $_POST['bannerPrice' . [$i]],
    				   )
    			   );
    			}
    		}
    		else {
    		?>	
    
    	<div id="settings_wrap">
              <div id="settings_main">
                 <h1>Product Calculator Settings</h1><hr/>
                 <h3>You can edit settings for specific product categories to work with the Product Calculator</h3>
              </div>
              <form action="" method="post">
                 <input type="submit" value="Save" id="top-submit" />
                     <div class="setting-section">
                         <h2>Banners | <input type="button" value="Add Pricing" /></h2>
                         <table>
                              <tr>
                                    <th colspan="2">Measurement Range (sq. ft.)</th>
                                    <th>Price for Range ($ 0.00)</th>
                               </tr>
                               <?php
                               	$DBresults = $wpdb->get_results('Select * from ' . $wpdb->prefix . 'WH_settings');
                               	$result_count = count($DBresults);
                               	for ($i = 0; $i < $result_count; $i++){
                               ?>
                              <tr><td><input type="text" name="<?php echo 'bannerFrom'.$i; ?>" value="<?php echo $DBresults->sqft_from[$i]; ?>"; /></td><td> - <input type="text" name="<?php echo 'bannerTo'.$i; ?>" value="<?php echo $DBresults->sqft_to[$i]; ?>" /></td><td><input type="text" name="<?php echo 'bannerPrice'.$i; ?>" value="<?php echo $DBresults->m_price[$i]; ?>" /></td></tr>
                              <?php } ?>
                         </table>
                     </div>
    		<input type="submit" name="submit" value="Save" id="top-submit">
              </form>
            </div>
    	<?php }
        }

    I have tried different methods of wpdb->insert with and without the formatting, changing the form action to “options.php” and without but the data is never inserted into the table.

    Do I need to call the calc_page_setup() function on POST?

    thanks

    Thread Starter iamjds

    (@iamjds)

    What are you trying to do exactly? I don’t mind sharing my code, but the purpose of me posting this article was because I did not find a solution either.

    When I contacted WooThemes to assist me with this issue, they could not offer me assistance because I have not purchased any of their products.

    The main problem I am having is it initially posts the new total price to the cart widget, but when I go to the cart.php page, the value is $0.00.

    I’m sorry I cannot be of any other assistance at this time. Definitely interested in hearing a solution if you find one.

    Thread Starter iamjds

    (@iamjds)

    I ended up creating a child page for the woocommerce template with the additional tags needed.

Viewing 10 replies - 1 through 10 (of 10 total)