X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (X-Cart 5) (https://forum.x-cart.com/forumdisplay.php?f=56)
-   -   remove "continue shopping" button from product page (https://forum.x-cart.com/showthread.php?t=68110)

daboy18 11-08-2013 07:25 AM

remove "continue shopping" button from product page
 
After you add a product to your cart, then go back to the product page, a button labled "continue shopping" is below "buy more"

How can i remove/delete this "continue shopping" button?

I'm sure this has been asked but I cannot find the correct file to modify (or if it can be done in the admin area).

Thank you.

i use: X-Cart Next core v.1.2.3
http://vcsigns.com/store/

daboy18 11-08-2013 01:45 PM

Re: remove "continue shopping" button from product page
 
can anyone please help. I saw other posts go up after mine and they have responses already! Thanks.

tony_sologubov 11-11-2013 05:22 AM

Re: remove "continue shopping" button from product page
 
Hi Dave!

It was described here: http://forum.x-cart.com/showthread.php?t=66688

Let me know if you need some more explanation.

Tony.

daboy18 11-11-2013 06:27 AM

Re: remove "continue shopping" button from product page
 
Hi Tony! Thank you for responding as your help is always appriciated!

I re-read that entire thread, it was helpful proir, but i didnt see where it discussed "removing the 'continue shopping' button"

When you click "continue shopping" [mine says category page because i renamed it] it goes back to the category page. I would like to request have it removed all toghter but not sure which file to do it in or what code to comment out. Thanks again for additiaonal help.

tony_sologubov 11-12-2013 04:10 AM

Re: remove "continue shopping" button from product page
 
Oh, yes. I missed that this part was not described.

In this case, you need to add the following lines into the runBuildCacheHandler() function in the Main.php file.

Do not forget to rebuild the cache after that and this change should do the trick.

Code:

        $layout->removeTemplateFromList(
            'product/details/parts/common.button-continue.tpl',
            'product.details.page.info.buttons.cart-buttons'
        );
   
        $layout->removeTemplateFromList(
            'product/details/parts/common.button-continue.tpl',
            'product.details.quicklook.info.buttons.cart-buttons'
        );


daboy18 11-12-2013 08:26 AM

Re: remove "continue shopping" button from product page
 
Thanks tony.
I applied that code in Main.php (which is located: store/classes/XLite/Module/CDev/CartCorrections/Main.php) [is this the correct location?]

After i "rebuild cache" from the admin area, i checked the cart product page which as already been added and the "continue shopping" - which says "category page" is still there.

(i manually added in the buttons above on the page, which is why i need to remove "continue shopping" which is labeled "category page"

http://vcsigns.com/store/cart.php?target=product&product_id=57

thanks

tony_sologubov 11-13-2013 03:57 AM

Re: remove "continue shopping" button from product page
 
Hi Dave!

Sorry, it was my bad. I mentioned the incorrect List in my previous code. The correct code for removing these buttons is:

Code:

        $layout->removeTemplateFromList(
            'product/details/parts/common.button-continue.tpl',
            'product.details.page.info.buttons-added'
        );
   
        $layout->removeTemplateFromList(
            'product/details/parts/common.button-continue.tpl',
            'product.details.page.info.buttons-added'
        );


You should these lines instead of ones I provided earlier.

Put them into the body of the runBuildCacheHandler() function in the Main.php file (you are right about its path) and regenerate the cache. It should do the trick.

daboy18 11-19-2013 12:38 PM

Re: remove "continue shopping" button from product page
 
1 Attachment(s)
Quote:

Originally Posted by tony_sologubov
Hi Dave!

Sorry, it was my bad. I mentioned the incorrect List in my previous code. The correct code for removing these buttons is:

Code:

        $layout->removeTemplateFromList(
            'product/details/parts/common.button-continue.tpl',
            'product.details.page.info.buttons-added'
        );
 
        $layout->removeTemplateFromList(
            'product/details/parts/common.button-continue.tpl',
            'product.details.page.info.buttons-added'
        );


You should these lines instead of ones I provided earlier.

Put them into the body of the runBuildCacheHandler() function in the Main.php file (you are right about its path) and regenerate the cache. It should do the trick.


Thanks for the info again Tony!
I did as you said, after rebuilding the cache, the button was still there; unless im sure im doing something wrong. I attached the file which you told me to modify. Maybe you can see something in the code that I cant. thanks again.

daboy18 11-20-2013 07:31 AM

Re: remove "continue shopping" button from product page
 
I needed to ENABLE the add-on.

the last code you provided DID work.
After I rebuilt the cache, nothing showed, thats because the add-on was disabled.

After enabling it, the button was gone.

Thank you.

tony_sologubov 11-21-2013 03:39 AM

Re: remove "continue shopping" button from product page
 
Happy to hear it is resolved now!


All times are GMT -8. The time now is 01:12 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.