New Landing How can we help? Atelier Showing Product URL Button Product Archive Page

Viewing 15 posts - 1 through 15 (of 15 total)
  • Posted in: Atelier
  • #199371
    ecrotty
    Member
    Post count: 25

    Hi!

    I want to be sure I do this the “right” way rather than hack it in a template.

    All of my products are Amazon’s. I have put woocommerce in catalog mode.

    On a single-product page, I see the button to buy just fine and the button uses the product URL product field. Great!

    Now, I would like to show the same button to buy on the archive-product page in the woocommerce loop. I would also like to customize the class the button uses.

    What is the best / right way to see the button to buy for each product in the product loop while in catalog mode?

    Thanks!

    (And it may be unnecessary but I want to say I LOVE the theme.)

    #199393
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Hi,

    In that situation I think you shouldn’t use the catalog mode and set your products as external product so it would jump for their respective Amazon link.

    Check here in this page of the Woocommerce documentation.
    http://docs.woothemes.com/document/managing-products/

    -Rui

    #199398
    ecrotty
    Member
    Post count: 25

    Oh.

    Looks like that adds a “Read More” button rather than an external URL button. I just tried it out.

    I’d rather not add a step / new page to the mix. I’d like people to be able to click right to Amazon within the output of the woocommerce loop on the archive-product page.

    For my needs, it sounds like the best way to do this would be to use the button line from woocommerce/single-product/add-to-cartexternal.php and put it in woocommerce/archive-product.php in a child theme?

    Did you have any other ideas?

    Thanks for the quick reply!

    #199433
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Check this code inside the Atelier/woocommerce/loop/add-to-cart.php
    https://www.dropbox.com/s/xt30gzjq7u1ydws/Screenshot%202015-07-30%2016.48.04.png?dl=0

    Copy that file to the child theme maintaining the same directory structure

    Then replace this line
    $link['url'] = apply_filters( 'external_add_to_cart_url', get_permalink( $product->id ) );

    by this one
    $link['url'] = apply_filters( 'external_add_to_cart_url', esc_url( $product->get_product_url() ));

    also change the Read More text.
    Let us know if it worked.

    -Rui

    #199441
    ecrotty
    Member
    Post count: 25

    That worked!

    Which is great…

    But I’m not sure that it solves my problem.

    I know the design of your suggestion is very sexy, and that’s great, but I’m going for simple, simple, simple.

    I want to hit someone over the head with it. There should be no discovery of where to click to go to Amazon — it should be obvious.

    I’d really just like it to be a button (href class button), just like the one in product-single, under the price of each item.

    #199469
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    We can hide the icon and show the other text. Would be something like this.
    https://www.dropbox.com/s/9rt41ndrlv7yccz/Screenshot%202015-07-30%2018.24.23.png?dl=0

    -Rui

    #199474
    ecrotty
    Member
    Post count: 25

    ๐Ÿ™‚

    Yea… I don’t know.

    It’s something about needing to hover over the image.

    I’d much rather someone be able to make the leap immediately over to Amazon rather than spend more time, and possibly losing interest, on the next full product overview page.

    And, please — don’t take my feedback as negative.

    I think all of the options you have provided are fantastic! It makes a lot of sense for a target audience that is to be wowed or feel excited about the overall experience of the store.

    That’s not my audience, however.

    They are typically older and not as technically savvy as others.

    Guiding them and giving them just a few options is the best user experience I can provide.

    Also, my desire for a button is based in knowing what my audience likes about my existing site.

    Again — this is all good stuff!!!

    But I’m more interested in the best way to put a button on the description area div, not the image area div.

    Thanks for the continued help and ideas.

    #199475
    ecrotty
    Member
    Post count: 25
    This reply has been marked as private.
    #199731
    ecrotty
    Member
    Post count: 25

    Is it safe to assume that the only way I can do what I want is to hack it into a child-theme?

    Thanks!

    #199738
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Hi,

    Do you any mocuk image of what you want to achieve regarding the product button?
    https://www.dropbox.com/s/qa9zn46b2qyaiq8/Screenshot%202015-07-31%2015.10.32.png?dl=0

    Is something below the price?

    Yes, this would have to be done in the child theme.

    Regarding the custom work most part of the team is not available. Will check if someone is available.
    We also advise the http://werkpress.com/

    -Rui

    #199741
    ecrotty
    Member
    Post count: 25

    I can make it happen… I just wanted to know if there was a “best practice” way to do it.

    And I think that may have created the confusion.

    Everything is ok! ๐Ÿ™‚

    Child theme it is.

    And, please, do let me know about availability by emailing me direct.

    I’ll check out your recommendation in the meantime.

    Thanks again!

    #199742
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Ok no problem, thanks Rui

    #199918
    ecrotty
    Member
    Post count: 25

    If anyone else reading this thread is needing the same answer, here’s how I fixed this using my child functions.php file:

    add_action( ‘woocommerce_after_shop_loop_item_title’, ‘woocommerce_external_add_to_cart’ );

    That way, I did it in the “best practice” woocommerce way and didn’t need to hack it into a woocommerce template.

    #199983
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Great thanks to sharing this solution.
    Mohammad

    #199985
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Great. Thanks for sharing.
    Unfortunately no one is available, check those guys from Werkpress.

    -Rui

Viewing 15 posts - 1 through 15 (of 15 total)

You must be logged in and have valid license to reply to this topic.

License required for the following item
Login and Registration Log in · Register