WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Unique product in shop – no need for "Continue Shopping"

[Resolved] Unique product in shop – no need for "Continue Shopping"

Viewing 15 replies - 1 through 15 (of 17 total)
  • whitelamp
    Participant

    @whitelamp

    I’ve looked at the code that generates it and it seems to have
    class=’continue_shopping’
    so your best bet is to hide it using CSS in your theme’s CSS file.

    whitelamp
    Participant

    @whitelamp

    My guess is you should have a look at:
    wpsc-core/js/wp-e-commerce.js
    1163: jQuery( ‘div.wpsc_variation_forms’ ).on( ‘change’, ‘.wpsc_select_variation’, function() {

    then perhaps create your own class and function

    whitelamp
    Participant

    @whitelamp

    Sorry, wrong thread.

    palmerstoneroad
    Member

    @palmerstoneroad

    Hi whitelamp,

    thanks for this.

    I have been looking in WPEC CSS file in my theme folder but there I am not able to find where the for “continue_shopping” instruction actually is.

    Can you give me more details about the right place to look for it?

    thanks again for your help, much appreciated

    whitelamp
    Participant

    @whitelamp

    At a guess – go to wp-content/themes/yourtheme/wpsc-default.css and
    add:

    .continue_shopping {
    display: none;
    }

    but that is not tested or anything.

    palmerstoneroad
    Member

    @palmerstoneroad

    yes, I have tried this option but that instruction does not move anything in the fancy notification box 🙂

    palmerstoneroad
    Member

    @palmerstoneroad

    Do you think it’s possible to remove the link with javascript and jQuery?

    If yes, what is the file to edit?

    thanks!

    whitelamp
    Participant

    @whitelamp

    Really, simplest is to hide it with CSS. If my suggestion doesn’t work then try using firebug or a developer toolbar to see why.

    Jeffrey Schutzman
    Member

    @jeffpyebrookcom

    Mihai from Instinct pointed out to me that you can change the content with a simple filter.

    Hook wpsc_add_to_cart_json_response and you can change the content of the fancy notification to whatever you want.

    See WP-e-Commerce\wpsc-components\theme-engine-v1\helpers\ajax.php at line 193.

    palmerstoneroad
    Member

    @palmerstoneroad

    I have tried, adding

    .continue_shopping {
    display: none;
    }

    to wp-content/themes/mytheme/wpsc-default.css

    but the link it’s still there.

    Curious thing I am not able to locate the CSS where instruction continue_shopping is included.

    Chrome Developer toolbar does still refer to wpsc-default.css, weird that the ‘display: none’ instruction is simply ignored.

    I am not a developer so I cannot go further in my analysis; any suggestion would be more than appreciated.

    thanks!

    palmerstoneroad
    Member

    @palmerstoneroad

    Hi Jeff Pye Brook,

    just saw your comment now.

    what you mean by ‘Hook’? Sorry, I am not a developer so any further explanation would help me following your suggestion 🙂

    thanks!

    Jeffrey Schutzman
    Member

    @jeffpyebrookcom

    I’ll create a little plugin for you to use that removes the notification, give me a little bit and I will post a download link.

    Jeffrey Schutzman
    Member

    @jeffpyebrookcom

    palmerstoneroad
    Member

    @palmerstoneroad

    Hi Jeff Pye brook,

    thank you so much for this. Simply amazing 🙂

    Out of curiosity: any particular reason you choose to go with a plugin instead of editing WPEC code to remove the link?

    thanks again!

    Jan Dembowski
    Volunteer Mod. & Brute Squad

    @jdembowski

    Out of curiosity: any particular reason you choose to go with a plugin instead of editing WPEC code to remove the link?

    Making another plugin is better: if you modify WPEC directly then you’ll lose those changes when the plugin is updated. By doing it the way that Jeff did then your changes will remain in effect even if the WPEC plugin is updated.

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘[Resolved] Unique product in shop – no need for "Continue Shopping"’ is closed to new replies.