Jump to content
puggybelle

Move Add To Cart button to the top of product_info

Recommended Posts

2.3.4.1 CE

Currently, buttons appear at the bottom of my item descriptions.  How can I move them to the top instead?

- Andrea

Share this post


Link to post
Share on other sites

@puggybelle

(please ignore my last post ... senior moment)

in  Admin | Modules | Content  ... click on 'Buy Button' ... click 'Edit' ... change the Sort Order to something like '10'

You will have to do a little adjusting of the layout to get the button exactly where you want it.

HTH

M


Get the latest Responsive osCommerce CE (community edition) here .

Share this post


Link to post
Share on other sites

Just a note, I copied* the module to a 2nd instance so that I have one buy button on the top of the product info page and another at the bottom 

(I have some products with a rather long desxcription, sometimes even a youtube video within the descriotion etc so I do not want the customer to have to search that button for long ;) . And I reduced the size to a 'normal' button instead of the large bar)

*copying the module / template / language file alone is not enough, you need to change all the labels like MODULE_CONTENT_PI_BUY_SORT_ORDER to MODULE_CONTENT_PI_BUY_SORT_ORDER_2 etc

Share this post


Link to post
Share on other sites

Thank You both for the replies.

Artcolnc:  Never would I have imagined that I could relocate a button by changing its sort order.  I just assumed I'd be hacking up code.  Thanks for that!

Inra311:  I like your idea, too.  My item descriptions are long and having the button at the top and the bottom probably is the way to go.

Question -  which files did you duplicate to achieve that? 

- Andrea

Share this post


Link to post
Share on other sites

@puggybelle

This is the entire reason for making everything modular ... you can enable or disable modules ... or even add new modules ... and move them around ... all without any core code changes.

And @inra311 is correct ... you can duplicate a module, and have both modules display on the same screen in different places. You MUST give each module a different name, which means more than just changing the file name. Within each module file is the name of the module and all of its pieces. You must change ALL references to the module name. @inra311 added the _2 to the module name. Personally, I would give the modules a more descriptive name, such as <MODULE>_DISPLAY_TOP and <MODULE>_DISPLAY_BOTTOM.

As to which files to duplicate ... look at all of the files that make up a module: the file with the code, the template file, the language file, etc. Just think about it ... you can figure this out :cool:

M


Get the latest Responsive osCommerce CE (community edition) here .

Share this post


Link to post
Share on other sites
1 hour ago, puggybelle said:

Question -  which files did you duplicate to achieve that?

I attached the three files needed for it. You can just copy them into your shop, and install the module in admin-> modules -> content--> install module

I am not a developer (so to be used at your own risk)  but at least I could create simple modules like this, or an additional text box to be placed wherever needed, or a module that just outputs some empty lines to get more space between blocks where desired, etc.

@wHiTeHaT  's module creator has been also very helpful for such things :thumbsup:

buy_button_2.zip

Share this post


Link to post
Share on other sites

@puggybelle

I was hoping that this would be an opportunity for you to explore and learn how these modules work, and figure out how to make a new module for yourself. But, since @inra311 has already done the work for you, please take the time to examine what he has done, and see if you can make a new module on your own. You're never going to learn if you keep having someone else do things for you.

M


Get the latest Responsive osCommerce CE (community edition) here .

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×