• Resolved perflexo

    (@perflexo)


    Hello everyone, i’ve been looking for a way without a plugin to Display history of recently viewed products under Customers my account dashboard, if any one has a working tip or trick please share or help . thank you in advance.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Kaushik S. a11n

    (@kaushiksomaiya)

    Hi there!

    Thanks for contacting us.

    I understand you are looking to add Recently Viewed Products under “My Accounts” dashboard.

    The only thing I was able to think of here, to achieve this without using a plugin, is:

    1) Create a widget area in “My Accounts” section

    You could create a widget area at any location you’d like to: Hooks for My Account page.

    Here’s how to create a widget area.

    2) Use the “Recently Viewed Products list” widget

    You could then use the “Recently Viewed Products list” widget which is provided in WooCommerce by default, in the Appearance > Widgets screen.

    I’m going to leave this thread open for a bit to see if anyone else is able to chime in to help you out with other ideas.

    I can also recommend the WooCommerce Developer Resources Portal for resources on developing for WooCommerce.

    You can also visit the WooCommerce Facebook group or the #developers channel of the WooCommerce Community Slack. We’re lucky to have a great community of open-source developers for WooCommerce, and many of our developers hang out there, as well.

    I hope this helps! ??

    Thread Starter perflexo

    (@perflexo)

    hey Kaushik,

    tnx for your reply, your solution seems good, but what im looking for is to hook “Recently Viewed Products list” into my account dashboard, i already succeed with “on sale” with this code :

    add_action( ‘woocommerce_account_dashboard’,’on_sale_dashboard_shortcode’ );
    function on_sale_dashboard_shortcode () {
    echo do_shortcode(“[sale_products limit=’10’ row=’1′ columns=’5′ visibility=’new’ orderby=’rand’]”);
    }

    but it doesn’t seem to work with “Recently Viewed Products list”, the code im trying to use is :

    add_action( ‘woocommerce_account_dashboard’,’recently_viewed_products_dashboard_shortcode’ );
    function recently_viewed_products_dashboard_shortcode () {
    echo do_shortcode(“[recently_viewed_products limit=’10’ row=’1′ columns=’5′ visibility=’new’ orderby=’rand’]”);
    }

    maybe i’m messing something or doing it wrong, i’m not good.

    thank you.

    Plugin Support Paulo P – a11n

    (@paulostp)

    Hello @perflexo,

    Custom coding is outside our scope of support, so I would advise you to check the developer resources Kaushik linked. Either way, this topic will be open for a while to see if someone from the community can help.

    Best,

    Seems we’ve not had additional inputs on this thread. Thus, we encourage you to make use of the above resources.

    I’ll go ahead and mark the thread as resolved but please feel free to create a new thread if you have further questions.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Display recently viewed products under Customer account’ is closed to new replies.