K
K
kondrash0552016-04-14 16:15:52
Electronic commerce
kondrash055, 2016-04-14 16:15:52

Why is the add to cart button not showing on wp e-commerce product_page?

Good day. I have a wordpress site with wp e-commerce plugin and e-commerce grid view.
The problem is that the add to cart button is not displayed on the main page. In the admin panel in the settings, the checkbox to show the button is worth it.

<?php if((get_option('hide_addtocart_button') == 0) &&  (get_option('addtocart_or_buynow') !='1')) : ?>
                <?php if(wpsc_product_has_stock()) : ?>
                  <div class="wpsc_buy_button_container">
                    <div class="wpsc_loading_animation">
                      <img title="" alt="<?php esc_attr_e( 'Loading', 'wp-e-commerce' ); ?>" src="<?php echo wpsc_loading_animation_url(); ?>" />
                      <?php _e('Updating cart...', 'wp-e-commerce'); ?>
                    </div><!--close wpsc_loading_animation-->
                      <?php if(wpsc_product_external_link(wpsc_the_product_id()) != '') : ?>
                      <?php $action = wpsc_product_external_link( wpsc_the_product_id() ); ?>
                      <input class="wpsc_buy_button" type="submit" value="<?php echo wpsc_product_external_link_text( wpsc_the_product_id(), __( 'Buy Now', 'wp-e-commerce' ) ); ?>" onclick="return gotoexternallink('<?php echo esc_url( $action ); ?>', '<?php echo wpsc_product_external_link_target( wpsc_the_product_id() ); ?>')">
                      <?php else: ?>
                    <input type="submit" value="<?php _e('Add To Cart', 'wp-e-commerce'); ?>" name="Buy" class="wpsc_buy_button" id="product_<?php echo wpsc_the_product_id(); ?>_submit_button"/>
                      <?php endif; ?>
                  </div><!--close wpsc_buy_button_container-->

I understand that this piece of code is responsible for displaying the button.
I can't even imagine what it could be. Has anyone experienced similar behavior?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mr Crabbz, 2016-04-14
@Punkie

<?php if((get_option('hide_addtocart_button') == 0) &&  (get_option('addtocart_or_buynow') ='1')) : ?>

So try the first line. Removed exclamation point in if

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question