Woocommerce php change has resulted in product photo disaster!
-
Please help me … I am bumbling my way through and was doing so well until I got over-confident and decided to change a template in Woocommerce.
I wanted to change the up-sells text from “you may also like” to “don’t forget your finishing products”
So I changed the php and now my product photos won’t display.
My domain is http://www.vintagerocksinteriors.com
Can you see what’s wrong????
if ( ! defined( ‘ABSPATH’ ) ) {
exit; // Exit if accessed directly
}global $product, $woocommerce_loop;
$upsells = $product->get_upsells();
if ( sizeof( $upsells ) === 0 ) {
return;
}$meta_query = WC()->query->get_meta_query();
$args = array(
‘post_type’ => ‘product’,
‘ignore_sticky_posts’ => 1,
‘no_found_rows’ => 1,
‘posts_per_page’ => $posts_per_page,
‘orderby’ => $orderby,
‘post__in’ => $upsells,
‘post__not_in’ => array( $product->id ),
‘meta_query’ => $meta_query
);$products = new WP_Query( $args );
$woocommerce_loop[‘columns’] = $columns;
if ( $products->have_posts() ) : ?>
<div class=”upsells products”>
<h2><?php _e( ‘Don’t forget your finishing product…’, ‘woocommerce’ ) ?></h2>
<?php woocommerce_product_loop_start(); ?>
<?php while ( $products->have_posts() ) : $products->the_post(); ?>
<?php wc_get_template_part( ‘content’, ‘product’ ); ?>
<?php endwhile; // end of the loop. ?>
<?php woocommerce_product_loop_end(); ?>
</div>
<?php endif;
wp_reset_postdata();
The blog I need help with is: (visible only to logged in users)
-
You are confusing wordpress.com hosted blogs and wordpress.org software installs. You need to have a wordpress.ORG site on paid hosting https://wordpress.ORG/hosting to run woocommerce. You cannot run it on a wordpress.COM hosted blog.
WordPress.COM and WordPress.ORG are completely separate and have different logins, features, run different versions of some themes with the same names, and have separate support documentation and separate support forums. Read the differences here http://en.support.wordpress.com/com-vs-org/
If you don’t have a username account at WordPress.ORG click http://wordpress.org/support/ and register one on the top right hand corner of the page that opens, so you can post to the support forums there.
Resetting your WordPress.ORG password http://codex.wordpress.org/Resetting_Your_Password
WordPress.org support docs are at https://codex.wordpress.org/Main_Page -
-
-
Please read what Staff said here https://en.forums.wordpress.com/topic/e-commerce-options-1?replies=5
-
Provided you are selling only what you yourself make or a service that you personally provide on a wordpress.COM site you have two options.
(1) PayPal – Know that the only instructions that will work for posting a PayPal donation button on a WordPress.com blog are found here http://en.support.wordpress.com/paypal/
Note that the PayPal email link is not supported and PayPal customization options are not supported either https://en.forums.wordpress.com/topic/paypal-button-41?replies=12#post-2517229(2) If you set up an eCommerce site somewhere else online you can create a custom menu http://en.support.wordpress.com/menus/ and include a custom link to that site in it. http://en.support.wordpress.com/menus/#adding-custom-links
Some bloggers create a contact form https://en.support.wordpress.com/contact-form/ on a page and after the people have made a PayPal donation they provide the link to a private page for downloading files. Maybe that will work for you.
http://en.support.wordpress.com/pages/
http://en.support.wordpress.com/pages/page-visibility/
- The topic ‘Woocommerce php change has resulted in product photo disaster!’ is closed to new replies.