Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • almerika

    (@almerika)

    Works fine now. Thx.

    almerika

    (@almerika)

    Same problem here. Any solutions?

    Thread Starter almerika

    (@almerika)

    @gonerator
    I’m getting closer.

    Took your code and changed ‘someslug‘ to ‘testprodukt‘ which is the tag I’m testing with. After that I changed ‘some_html_or_javascript‘; to ‘<p>Testprodukt. Går ej att beställa.</p>‘ (in english that means you can’t order this test product). Works fine. The text is only displayed on the products with that tag. Here’s the test product: http://www.olsonsab.se/produkter/tillbehor/testprodukt/

    So now theres only one thing left. I need an action code that triggers to hide the addtocart-button on these products. Any clues?

    Thread Starter almerika

    (@almerika)

    @bcworkz – thanks for your help

    @gonerator
    Which file is the “product_view div” in?
    I’ve been looking in wpsc-single_product.php since that’s the only view showing the buy-button on this web, but I’m not sure where to put the code. There’s a place in that file looking like the code below. Should I paste it somewhere there?

    Another question. I’m not sure what parts I should change in the code you pasted. Could you make them bold?

    * Cart Options
    							 */
    							?>
    
    							<?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">
    											<?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', 'wpsc' ) ); ?>" 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', 'wpsc'); ?>" name="Buy" class="wpsc_buy_button" id="product_<?php echo wpsc_the_product_id(); ?>_submit_button"/>
    											<?php endif; ?>
    										<div class="wpsc_loading_animation">
    											<img title="Loading" alt="Loading" src="<?php echo wpsc_loading_animation_url(); ?>" />
    											<?php _e('Updating cart...', 'wpsc'); ?>
    										</div><!--close wpsc_loading_animation-->
    									</div><!--close wpsc_buy_button_container-->

    A big thank you in advance!

    Thread Starter almerika

    (@almerika)

    Hi Gonerator.
    I’m still interested in your solution so if you have the time I’d be greatful.
    Cheers!

    Thread Starter almerika

    (@almerika)

    Hi there,
    I still haven’t fixed this so I would really be glad for some assistans.

    What I like to do is to hide the buy button with css on a specific product category or on a product with a specific product tag.

    Here’s a test product I’m working with:
    http://www.olsonsab.se/produkter/tillbehor/testprodukt/

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