Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

what is needed to create a content module for shopping cart page


bruyndoncx

Recommended Posts

I modified an older free products module for inclusion on the shopping_cart page which hasn't been translated yet.

 

Now I wondered if I should add files to includes/languages/english/modules/free_products.php

or to shopping_cart.php

 

or rather create a content module - but what is needed for that to make it working ?

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Link to comment
Share on other sites

With as much as the shopping cart page does, and it being only one module, it would certainly be easier to just make a stand alone module and include it where wanted on the shopping cart page.

 

However, doing the groundwork needed to install content modules into the shopping cart page could be beneficial for any future addons that deal with the shopping cart page. Some things come to mind such as an up sell module,  login form, text area/banner, shipping estimate, etc;etc;etc;

 

Its boils down to a matter of your own preference.

 

Creating a content module is fairly straight forward.  On the page you want the content to display, you would need something like:

<?php echo $oscTemplate->getContent('UNIQUE_CONTENT_NAME_HERE'); ?>

Then inside includes/modules/content/ you would add a new directory that is named the same as the name you created for the content output.

 

The same for the languages.

 

Inside of the content directory you create you may or may not need a templates directory.

 

There is also a method of outputting content using the includes/modules/pages/ directory, inside there you will find an example of the account page links. I haven't really gone any further than looking at that module, so no experience there, I'm really not sure why there is a pages as well as content module setup.

 

 

Look inside includes/modules/content/checkout_success/ to get a good example of how things work with each other. That set has some good examples off various types of modules. You can see how the downloads is setup to pull in and output an existing module, while the redirect old orders module needs nothing more than itself, and the other 2 use a templates/ file.

 

2 weeks ago I coded up a free sample module for the shopping cart page, but I just went for the quick and easy include(DIR_WS_MODULES......);

If I had to do it over again, I would go with the content module.

Follow the community build:

BS3 to osCommerce Responsive from the Get Go!

Check out the new construction:

Admin Gone to Total BS!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...