alguna
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] order action : send invoice to adminHi Riann,
Thanks a lot for your answer, the problem with that is that the consumer is going to receive the email too. I only want to be able to resend to the admin the emails from orders with this function, but without sending it again to the consumer, this is why I’m trying to re-create it from scratch with adding another action button …
Any idea how I could get the content from customer-invoice within the $content of the message ? Or would you suggest another trick ?
Thank you,
Forum: Plugins
In reply to: [WooCommerce] display attribute nameFinally found the solution, if it can help anyone :
$colo = array_shift( wc_get_product_terms( $_product->id, ‘pa_couleurs’, array( ‘fields’ => ‘names’ ) ) );
echo $colo;Forum: Hacks
In reply to: infowindow on googlemap for wordpressHi again bcworkz and acrane,
It finally works, thanks for the help 🙂
Everything needed to be declared in the for loop,Thanks
Forum: Hacks
In reply to: infowindow on googlemap for wordpressHi bcworkz,
Basically, this is what I’m trying to do, its calling well the markers with the get_post_meta, and I put in my loop the call for the title :
[<?php echo get_post_meta( $post->ID, 'location', true ); ?>, "<?php the_title(); ?>"]So basically my final code (which is not working) is the following one, but I don’t understand what I’m doing wrong :
<div id="map" style="width: 100%; height: 300px;"></div> <script> function initialize() { var locations = [ <?php $query = new WP_Query( 'cat=3' ); ?> <?php if ( $query->have_posts() ) : while ( $query->have_posts() ) : $query->the_post(); ?> [<?php echo get_post_meta( $post->ID, 'location', true ); ?>, "<?php the_title(); ?>"], <?php endwhile; wp_reset_postdata(); ?> <?php endif; ?> ]; var map = new google.maps.Map(document.getElementById('map'), { zoom: 12, center: new google.maps.LatLng(45.835163, 9.029694), mapTypeId: google.maps.MapTypeId.ROADMAP, styles : [{featureType:'all',stylers:[{saturation:-100},{gamma:0.0}]}] }); var infowindow = new google.maps.InfoWindow(); var marker, i; var contentString = locations[i][2]; var infowindow = new google.maps.InfoWindow({ content: contentString }); for (i = 0; i < locations.length; i++) { marker = new google.maps.Marker({ position: new google.maps.LatLng(locations[i][0], locations[i][1]), map: map, <?php if(in_category('8')):?> icon: 'https://maps.google.com/mapfiles/kml/shapes/schools_maps.png', <?php elseif (in_category('9')):?> icon: 'https://maps.google.com/mapfiles/kml/shapes/library_maps.png', <?php endif;?> }); google.maps.event.addListener(marker, 'click', function() { infowindow.open(map,marker); }); } } google.maps.event.addDomListener(window, 'load', initialize); </script>Thanks in advance
Forum: Fixing WordPress
In reply to: first image onlyThanks gotgotf,
But as I’m loading the images with a custom field in the post (‘photos_flat’), I can only display them with the code mentioned above, so when I try to display only the first of it, the code you tell me is not working unfortunatly …
instead of foreach, I would like to say for the first …
Thanks in advance,