Forum Replies Created

Viewing 15 replies - 1 through 15 (of 17 total)
  • Thread Starter r1se

    (@r1se)

    
    ### WordPress Environment ###
    
    Home URL: https://caramba.cl
    Site URL: https://caramba.cl
    WC Version: 2.6.8
    Log Directory Writable: ?
    WP Version: 4.6.1
    WP Multisite: –
    WP Memory Limit: 64 MB
    WP Debug Mode: –
    WP Cron: ?
    Language: es_ES
    
    ### Server Environment ###
    
    Server Info: Apache
    PHP Version: ? 5.4.45 - Recomendamos como mínimo la versión PHP 5.6. Ver: Cómo actualizar tu versión de PHP
    PHP Post Max Size: 8 MB
    PHP Time Limit: 30
    PHP Max Input Vars: 1000
    cURL Version: 7.38.0
    OpenSSL/1.0.1e
    
    SUHOSIN Installed: ?
    MySQL Version: ? 5.5.52 - Recomendamos como versión mínima de MySQL la 5.6. Ver: Requisitos de WordPress
    Max Upload Size: 2 MB
    Default Timezone is UTC: ?
    fsockopen/cURL: ?
    SoapClient: ?
    DOMDocument: ?
    GZip: ?
    Multibyte String: ?
    Publicación remota: ?
    Obtención remota: ?
    
    ### Database ###
    
    WC Database Version: 2.6.8
    : 
    woocommerce_sessions: ?
    woocommerce_api_keys: ?
    woocommerce_attribute_taxonomies: ?
    woocommerce_downloadable_product_permissions: ?
    woocommerce_order_items: ?
    woocommerce_order_itemmeta: ?
    woocommerce_tax_rates: ?
    woocommerce_tax_rate_locations: ?
    woocommerce_shipping_zones: ?
    woocommerce_shipping_zone_locations: ?
    woocommerce_shipping_zone_methods: ?
    woocommerce_payment_tokens: ?
    woocommerce_payment_tokenmeta: ?
    
    ### Active Plugins (16) ###
    
    Advanced Custom Fields PRO: por Elliot Condon – 5.4.8
    BackupBuddy: por iThemes – 6.5.0.16
    Beautiful taxonomy filter: por Jonathan de Jong – 2.1.0
    Comunas de Chile para WooCommerce: por Anyda SRL  – 0.1
    WooCommerce WebpayPlus WS Chile: por Cristian Tala Sánchez – 3.5.4-WS-DEVEL
    Custom Post Type UI: por WebDevStudios – 1.4.3
    Regenerate Thumbnails: por Alex Mills (Viper007Bond) – 2.2.6
    Orden en Taxonomías y Categorías: por Nsp-Code – 1.4.8
    WooCommerce User Role Minimums: por Stephen Sherrard – 1.6.0.1
    WooCommerce Product CSV Import Suite: por Automattic – 1.10.12
    WooCommerce Table Rate Shipping: por Automattic – 3.0.2
    WooCommerce Wholesale Prices Premium: por Rymera Web Co – 1.12.1
    WooCommerce Wholesale Prices: por Rymera Web Co – 1.2.8
    WooCommerce: por WooThemes – 2.6.8
    WooCommerce Helper: por WooCommerce – 1.7.2
    Yoast SEO: por Equipo Yoast – 3.9
    
    ### Settings ###
    
    Force SSL: –
    Currency: CLP ($)
    Currency Position: left
    Thousand Separator: ,
    Decimal Separator: .
    Number of Decimals: 0
    
    ### API ###
    
    API Enabled: ?
    
    ### WC Pages ###
    
    Base de la tienda: #4 - /tienda/
    Carrito: #5 - /carro/
    Finalizar compra: #6 - /finalizar-comprar/
    Mi cuenta: #7 - /mi-cuenta/
    
    ### Taxonomies ###
    
    Product Types: simple (simple)
    grouped (grouped)
    variable (variable)
    external (external)
    
    ### Theme ###
    
    Name: Caramba
    Version: 1.0
    Author URL: https://www.faunadiseno.com
    Child Theme: ? – Si estás modificando WooCommerce en un tema padre que no has creado personalmente
    te recomendamos utilizar un tema hijo. Ver: : Cómo crear un tema hijo
    
    WooCommerce Support: ? No declarada
    
    ### Templates ###
    
    Overrides: caramba/woocommerce/archive-product.php
    caramba/woocommerce/auth/footer.php
    caramba/woocommerce/auth/form-grant-access.php
    caramba/woocommerce/auth/form-login.php
    caramba/woocommerce/auth/header.php
    caramba/woocommerce/cart/cart-empty.php
    caramba/woocommerce/cart/cart-item-data.php
    caramba/woocommerce/cart/cart-shipping.php
    caramba/woocommerce/cart/cart-totals.php
    caramba/woocommerce/cart/cart.php
    caramba/woocommerce/cart/cross-sells.php
    caramba/woocommerce/cart/mini-cart.php
    caramba/woocommerce/cart/proceed-to-checkout-button.php
    caramba/woocommerce/cart/shipping-calculator.php
    caramba/woocommerce/checkout/cart-errors.php
    caramba/woocommerce/checkout/form-billing.php
    caramba/woocommerce/checkout/form-checkout.php
    caramba/woocommerce/checkout/form-coupon.php
    caramba/woocommerce/checkout/form-login.php
    caramba/woocommerce/checkout/form-pay.php
    caramba/woocommerce/checkout/form-shipping.php
    caramba/woocommerce/checkout/payment-method.php
    caramba/woocommerce/checkout/payment.php
    caramba/woocommerce/checkout/review-order.php
    caramba/woocommerce/checkout/terms.php
    caramba/woocommerce/checkout/thankyou.php
    caramba/woocommerce/content-product.php
    caramba/woocommerce/content-product_cat.php
    caramba/woocommerce/content-single-product.php
    caramba/woocommerce/content-widget-product.php
    caramba/woocommerce/emails/admin-cancelled-order.php
    caramba/woocommerce/emails/admin-failed-order.php
    caramba/woocommerce/emails/admin-new-order.php
    caramba/woocommerce/emails/customer-completed-order.php
    caramba/woocommerce/emails/customer-invoice.php
    caramba/woocommerce/emails/customer-new-account.php
    caramba/woocommerce/emails/customer-note.php
    caramba/woocommerce/emails/customer-on-hold-order.php
    caramba/woocommerce/emails/customer-processing-order.php
    caramba/woocommerce/emails/customer-refunded-order.php
    caramba/woocommerce/emails/customer-reset-password.php
    caramba/woocommerce/emails/email-addresses.php
    caramba/woocommerce/emails/email-customer-details.php
    caramba/woocommerce/emails/email-footer.php
    caramba/woocommerce/emails/email-header.php
    caramba/woocommerce/emails/email-order-details.php
    caramba/woocommerce/emails/email-order-items.php
    caramba/woocommerce/emails/email-styles.php
    caramba/woocommerce/emails/plain/admin-cancelled-order.php
    caramba/woocommerce/emails/plain/admin-failed-order.php
    caramba/woocommerce/emails/plain/admin-new-order.php
    caramba/woocommerce/emails/plain/customer-completed-order.php
    caramba/woocommerce/emails/plain/customer-invoice.php
    caramba/woocommerce/emails/plain/customer-new-account.php
    caramba/woocommerce/emails/plain/customer-note.php
    caramba/woocommerce/emails/plain/customer-on-hold-order.php
    caramba/woocommerce/emails/plain/customer-processing-order.php
    caramba/woocommerce/emails/plain/customer-refunded-order.php
    caramba/woocommerce/emails/plain/customer-reset-password.php
    caramba/woocommerce/emails/plain/email-addresses.php
    caramba/woocommerce/emails/plain/email-customer-details.php
    caramba/woocommerce/emails/plain/email-order-details.php
    caramba/woocommerce/emails/plain/email-order-items.php
    caramba/woocommerce/global/breadcrumb.php
    caramba/woocommerce/global/form-login.php
    caramba/woocommerce/global/quantity-input.php
    caramba/woocommerce/global/sidebar.php
    caramba/woocommerce/global/wrapper-end.php
    caramba/woocommerce/global/wrapper-start.php
    caramba/woocommerce/loop/add-to-cart.php
    caramba/woocommerce/loop/loop-end.php
    caramba/woocommerce/loop/loop-start.php
    caramba/woocommerce/loop/no-products-found.php
    caramba/woocommerce/loop/orderby.php
    caramba/woocommerce/loop/pagination.php
    caramba/woocommerce/loop/price.php
    caramba/woocommerce/loop/rating.php
    caramba/woocommerce/loop/result-count.php
    caramba/woocommerce/loop/sale-flash.php
    caramba/woocommerce/myaccount/dashboard.php
    caramba/woocommerce/myaccount/downloads.php
    caramba/woocommerce/myaccount/form-add-payment-method.php
    caramba/woocommerce/myaccount/form-edit-account.php
    caramba/woocommerce/myaccount/form-edit-address.php
    caramba/woocommerce/myaccount/form-login.php
    caramba/woocommerce/myaccount/form-lost-password.php
    caramba/woocommerce/myaccount/form-reset-password.php
    caramba/woocommerce/myaccount/lost-password-confirmation.php
    caramba/woocommerce/myaccount/my-account.php
    caramba/woocommerce/myaccount/my-address.php
    caramba/woocommerce/myaccount/my-downloads.php
    caramba/woocommerce/myaccount/my-orders.php
    caramba/woocommerce/myaccount/navigation.php
    caramba/woocommerce/myaccount/orders.php
    caramba/woocommerce/myaccount/payment-methods.php
    caramba/woocommerce/myaccount/view-order.php
    caramba/woocommerce/notices/error.php
    caramba/woocommerce/notices/notice.php
    caramba/woocommerce/notices/success.php
    caramba/woocommerce/order/form-tracking.php
    caramba/woocommerce/order/order-again.php
    caramba/woocommerce/order/order-details-customer.php
    caramba/woocommerce/order/order-details-item.php
    caramba/woocommerce/order/order-details.php
    caramba/woocommerce/order/tracking.php
    caramba/woocommerce/product-searchform.php
    caramba/woocommerce/single-product/add-to-cart/external.php
    caramba/woocommerce/single-product/add-to-cart/grouped.php
    caramba/woocommerce/single-product/add-to-cart/simple.php
    caramba/woocommerce/single-product/add-to-cart/variable.php
    caramba/woocommerce/single-product/add-to-cart/variation-add-to-cart-button.php
    caramba/woocommerce/single-product/add-to-cart/variation.php
    caramba/woocommerce/single-product/meta.php
    caramba/woocommerce/single-product/price.php
    caramba/woocommerce/single-product/product-attributes.php
    caramba/woocommerce/single-product/product-image.php
    caramba/woocommerce/single-product/product-thumbnails.php
    caramba/woocommerce/single-product/rating.php
    caramba/woocommerce/single-product/related.php
    caramba/woocommerce/single-product/review-meta.php
    caramba/woocommerce/single-product/review-rating.php
    caramba/woocommerce/single-product/review.php
    caramba/woocommerce/single-product/sale-flash.php
    caramba/woocommerce/single-product/share.php
    caramba/woocommerce/single-product/short-description.php
    caramba/woocommerce/single-product/tabs/additional-information.php
    caramba/woocommerce/single-product/tabs/description.php
    caramba/woocommerce/single-product/tabs/tabs.php
    caramba/woocommerce/single-product/title.php
    caramba/woocommerce/single-product/up-sells.php
    caramba/woocommerce/single-product-reviews.php
    caramba/woocommerce/single-product.php
    caramba/woocommerce/taxonomy-product_cat.php
    caramba/woocommerce/taxonomy-product_tag.php
    
    
    Thread Starter r1se

    (@r1se)

    Hmm I’m not sure I explained my self correctly. unit tag has a value, but it’s the form id, so it doesnt help either.

    Anyways, what I finally did to get this working is the following:

    add_action('wpcf7_before_send_mail', 'wpcf7_update_email_body');
    
    function wpcf7_update_email_body($contact_form) {
    
      $submission = WPCF7_Submission::get_instance();
      $url = $submission->get_meta( 'url' );
    
     // Super nice wordpress function
      $postid = url_to_postid( $url );
      // Get ACF content
      $custom_content = get_field('contenido_noticias' , $postid);	
    
       if ( $submission ) {
       	$mail = $contact_form->prop('mail');
       	$mail['body'] .= $custom_content;
       $contact_form->set_properties(array('mail' => $mail));
      }
    }

    Since i’m able to get the url of the post I can use the wordpress function url_to_postid to get the post id. Then I can do whatever I need! Simple as that ??

    Thanks!

    Thread Starter r1se

    (@r1se)

    Sure!

    This is what I have on my form:

    [hidden hidden-300 "post_title"]
    
    [hidden hidden-144 "custom_field-contenido_noticias"]
    
    <p>Compartir con: [email compartir-email] </p>
    
    <p>[submit "Enviar"]</p>

    I’m not using the special tags since i’m outside of the main loop and this goes in my footer. I did try putting the form (php + shortcode) inside the loop, and special mail tags didn’t work.

    Im trying to add the content this way because of this problem:
    https://www.ads-software.com/support/topic/custom-field-send-as-html?replies=4

    Thanks for your help!

    Thread Starter r1se

    (@r1se)

    Hi Takayuki, thanks for the response!

    I was trying to use the code from there but had no luck.

    add_action('wpcf7_before_send_mail', 'wpcf7_update_email_body');
    
    function wpcf7_update_email_body($contact_form) {
    
      $submission = WPCF7_Submission::get_instance();
      $url = $submission->get_meta( 'url' );
      $unit_tag = $submission->get_meta( 'unit_tag' );
    
    	if ( $unit_tag
    		&& preg_match( '/^wpcf7-f(\d+)-p(\d+)-o(\d+)$/', $unit_tag, $matches ) ) {
    		$post_id = absint( $matches[2] );
    
    		if ( $post = get_post( $post_id ) ) {
    				$the_post_id = (string) $post->ID;
    				$the_post_name = $post->post_name;
    				$the_post_title = $html ? esc_html( $post->post_title ) : $post->post_title;
    				$test_variable = 'hai';
    		}
    	} 
    
      if ( $submission ) {
       $mail = $contact_form->prop('mail');
       $mail['body'] .= '<p> '. $url .' '. $the_post_id .' '. $the_post_name .''. $the_post_title .''. $test_variable .'</p>';
       $contact_form->set_properties(array('mail' => $mail));
      }
    }

    The only variable that gets printed on my mail is $url. That means that the “if ( $unit_tag….” statement is not working.

    Could you point me out on the right direction? I’m sure I must be doing something wrong.

    Thanks!

    Aww that’s a bummer. This thing’s driving me crazy.

    In the meantime im just adding this to my functions.php

    add_filter('wpcf7_hidden_field_value', 'limpiar_html_cf7hf');
    function limpiar_html_cf7hf($value = '') {
    	$value = esc_html(wp_strip_all_tags( $value ));
    	return $value;
    }

    This will send the custom field content as plaint text.

    I also tried another method:

    function wpcf7_update_email_body($contact_form) {
    
      $submission = WPCF7_Submission::get_instance();
      $url = $submission->get_meta( 'url' );
    
            global $post;
    	$the_post_id = $post->ID;
    
       if ( $submission ) {
       $mail = $contact_form->prop('mail');
       $mail['body'] .= '<p> '. $url .' '. $post.'</p>';
       $contact_form->set_properties(array('mail' => $mail));
      }
    }

    I was trying to get the post id, but it will always return a 0 or nothing. Depends on how I try to get it. If I could get the post id, i would be able to attach the custom field content to the end of the mail’s body. If you are using ACF you could do something like $post = get_field(‘field_name’ , post_id) and that works. I hard coded it and it worked, html was fine on the mail.

    So anyways, please let me know if you find a way to fix this. It would be awesome to render html tags correctly on mail.

    Hey there! Did you sort this out? I’m having the exact same problem!

    Sup dlvennie, did you manage to solve this?

    I’m having the same exact problem. Images get a 24 hours expires header from somewhere. They’re just ignoring the rules on the htaccess.

    Thread Starter r1se

    (@r1se)

    Update: I don’t have a clue what i’ve done, but i’ve fixed it. I did a lot of stuff on my db deleted some tables, imported it again etc. I’ll leave this as solved, and if I find out what I exactly did ill update again. Thanks for taking a look into this.

    Thread Starter r1se

    (@r1se)

    Yup, everything’s the same except urls.

    CPT UI was used on the old site and new site. In fact it’s the same site i’m backing up on another server to do some tests. Weird thing is that if I re create the custom post type, the posts won’t show up either.

    Thread Starter r1se

    (@r1se)

    That sounds great Never Settle. Please let us know if you guys get to compile it as a plugin! Sounds really good!

    ?Did you find a fix for this?

    Thanks a lot ryan! It works awesome.

    Anyone found a work around for this while Yoast team add this functionality to the plugin? Both plug-ins are great, it would be greater if they worked together!

    Thread Starter r1se

    (@r1se)

    No one?

    It’s basically this: https://support.advancedcustomfields.com/discussion/comment/9345#Comment_9345

    Looks like it’s something to get solved Yoast Side.

    Hi gus, did any of you manage to fix this? I’m having exactly the same problem.

    Heres my code:

    <?php 	
    
    					$the_query = new WP_Query(
    						 array(
    							'posts_per_page' => '3',
    							'paged' => get_query_var('paged'),
    							'category_name' => 'revista-matiz'
    						)
    					 );
    
    					if($the_query->have_posts()) : while ($the_query->have_posts()) : $the_query->the_post();
    			?>
    
    			<div id="contenedor-matiz">
    				<h1 class="titulo-post"><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h1>
    				<?php the_post_thumbnail('revista-matiz-thumb'); ?>
    				<?php the_content('seguir leyendo'); ?>
    			</div><!-- /#contenedor-matiz -->
    
    			<?php endwhile; endif; ?>
    
    			<?php 
    
    				wp_pagenavi( array('query' => $the_query ));
    				wp_reset_postdata();
    
    			?>

    Just like troya86 i’m using latest wordpress and wp pagenavi. My permalinks structure is /%category%/%postname%/

    Let’s find out what might be the problem!

Viewing 15 replies - 1 through 15 (of 17 total)