Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Back to Category Button for BS


Pelvis

Recommended Posts

Hallo everybody!

Im building a new store with OSC BS.

In my Old shop (OSC ver. 2.2) i had in catalog/product_info.php in the bottom a

Back Button that takes people back to the category list for the product they are on.

 

This is useful because many customers arrived a specific product directly from search engines, for diverting those people back to the category which the product belongs.

 

The Code (in product_info.php) was:

 

<td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT, tep_get_path($current_category_id = '')) . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; ?></td>

 

Is here someone experienced who can advise me if this code is obsolete if it works with the BS version or need to be adjusted to match the new BS version?
Link to comment
Share on other sites

@@Pelvis

  <div class="buttonSet">
    <?php echo tep_draw_button(IMAGE_BUTTON_BACK, 'fa fa-angle-left', tep_href_link('index.php', tep_get_path())); ?>
  </div>

My Add-ons
Advanced Cache Control Tool for osCommerce 2.3.x (non-bootstrap) Download Support
Ajax Product Listing for osC 2.3.4 (bootstrap) Download Support
Category New Products Carousel for osC 2.3.4 (bootstrap) Download Support
Category Popular Products Carousel for osC 2.3.4 (bootstrap) Download Support
Customer Testimonials for osCommerce 2.3.4 (bootstrap and non-bootstrap) Download Support
Front Page New Products Carousel for osC 2.3.4 (bootstrap) Download Support

Index Nested - Product Listing for osC 2.3.4 (bootstrapDownload Support
Match Categories in Search Results for osCommerce versions 2.3.x (non-bootstrap) Download Support
Modular Category Page for osC 2.3.4 (bootstrap)
Download Support

NEW Australia Post Shipping Modules for osCommerce 2.3.x (non-bootstrap) Download Support
NEW Equal Height Module for osC 2.3.4 (bootstrapDownload Support
Products Low Stock Report for osC 2.3.x (bootstrap and non-bootstrap) Download Support
Twitter Typeahead Autocomplete Search for osCommerce 2.3.4 (bootstrap and non-bootstrap)
Download Support

Upcoming Products Modules for osC 2.3.4 (bootstrap) Download Support

 
Assisted Add-ons
Scroll Boxes for osCommerce 2.3.x (bootstrap and non-bootstrap) Download Support
 
Bootstrap Add-ons created by other members
osCommerce Bootstrap Addons and Code

Link to comment
Share on other sites

@@Pelvis

 

A lot of developers think that. They want you to use what ever they recommend. The community version of oscommerce BS is supported and being developed. As to the official version, there has been no news and no seen development for years now, but don't be disheartened by that. Most addons are now only being created for the BS version.

REMEMBER BACKUP, BACKUP AND BACKUP

Link to comment
Share on other sites

Somebody ... a Developer told me that OSC is dead no Comunity no Help.

... Thank you ! Dominic!

Respect!!!

 

Wasn't me  :(

My Add-ons
Advanced Cache Control Tool for osCommerce 2.3.x (non-bootstrap) Download Support
Ajax Product Listing for osC 2.3.4 (bootstrap) Download Support
Category New Products Carousel for osC 2.3.4 (bootstrap) Download Support
Category Popular Products Carousel for osC 2.3.4 (bootstrap) Download Support
Customer Testimonials for osCommerce 2.3.4 (bootstrap and non-bootstrap) Download Support
Front Page New Products Carousel for osC 2.3.4 (bootstrap) Download Support

Index Nested - Product Listing for osC 2.3.4 (bootstrapDownload Support
Match Categories in Search Results for osCommerce versions 2.3.x (non-bootstrap) Download Support
Modular Category Page for osC 2.3.4 (bootstrap)
Download Support

NEW Australia Post Shipping Modules for osCommerce 2.3.x (non-bootstrap) Download Support
NEW Equal Height Module for osC 2.3.4 (bootstrapDownload Support
Products Low Stock Report for osC 2.3.x (bootstrap and non-bootstrap) Download Support
Twitter Typeahead Autocomplete Search for osCommerce 2.3.4 (bootstrap and non-bootstrap)
Download Support

Upcoming Products Modules for osC 2.3.4 (bootstrap) Download Support

 
Assisted Add-ons
Scroll Boxes for osCommerce 2.3.x (bootstrap and non-bootstrap) Download Support
 
Bootstrap Add-ons created by other members
osCommerce Bootstrap Addons and Code

Link to comment
Share on other sites

I give that to the Community.

---

http://addons.oscommerce.com/info/9495

---

For the first time ...it was time ...after 9 years with OsCommerce

In a couple of days i will give a second Contrib as an Module.

Question:

Is there a User Guide how someone can make a simple Modul for OsC 2.3.4 /BS.

For not to Changing the Core Codes always?

Link to comment
Share on other sites

  • 2 weeks later...

Dear @@Pelvis , @@auzStar

 

I tried this great contribution to an OSC EDGE and works well in desktop mode.

 

With a cell phone the screen moves a little to the right and that breaks the Bootstrap functionality.

 

Could it happens to you the same?

 

I also note thatt here is always a space between the Back button and the add to cart button, while the space between the Reviews button and the back button will shrink dynamically until the two buttons stay together next to each other.

 

Best regards

 

Valqui

:heart: Community Oscommerce fan :heart: You'll find the latest osC community version here.

 

Link to comment
Share on other sites

@@valquiria23

 

I would put the back button on a separate line, below the other buttons (i.e. using the code I posted above and placing under the code of the existing buttons in product_info.php).

 

@@Pelvis's adaption of this in the contribution he uploaded is probably not the best.

 

I posted the code above as a guide only, to answer his initial question in this thread. How you adapt this code and where you put it is up-to you.

 

If you still would like all the buttons on the same line you could probably do something like this (below code is to replace existing code):

  <div class="buttonSet row">
    <div class="col-xs-12 col-sm-6"><?php echo tep_draw_button(IMAGE_BUTTON_BACK, 'fa fa-angle-left', tep_href_link('index.php', tep_get_path())); ?> <?php echo tep_draw_button(IMAGE_BUTTON_REVIEWS . (($reviews['count'] > 0) ? ' (' . $reviews['count'] . ')' : ''), 'fa fa-commenting', tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params())); ?></div>
    <div class="col-xs-12 col-sm-6 text-right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_draw_button(IMAGE_BUTTON_IN_CART, 'fa fa-shopping-cart', null, 'primary', null, 'btn-success'); ?></div>
  </div>

This would push the add-to-cart button below the other buttons on small devices.

 

cheers​

My Add-ons
Advanced Cache Control Tool for osCommerce 2.3.x (non-bootstrap) Download Support
Ajax Product Listing for osC 2.3.4 (bootstrap) Download Support
Category New Products Carousel for osC 2.3.4 (bootstrap) Download Support
Category Popular Products Carousel for osC 2.3.4 (bootstrap) Download Support
Customer Testimonials for osCommerce 2.3.4 (bootstrap and non-bootstrap) Download Support
Front Page New Products Carousel for osC 2.3.4 (bootstrap) Download Support

Index Nested - Product Listing for osC 2.3.4 (bootstrapDownload Support
Match Categories in Search Results for osCommerce versions 2.3.x (non-bootstrap) Download Support
Modular Category Page for osC 2.3.4 (bootstrap)
Download Support

NEW Australia Post Shipping Modules for osCommerce 2.3.x (non-bootstrap) Download Support
NEW Equal Height Module for osC 2.3.4 (bootstrapDownload Support
Products Low Stock Report for osC 2.3.x (bootstrap and non-bootstrap) Download Support
Twitter Typeahead Autocomplete Search for osCommerce 2.3.4 (bootstrap and non-bootstrap)
Download Support

Upcoming Products Modules for osC 2.3.4 (bootstrap) Download Support

 
Assisted Add-ons
Scroll Boxes for osCommerce 2.3.x (bootstrap and non-bootstrap) Download Support
 
Bootstrap Add-ons created by other members
osCommerce Bootstrap Addons and Code

Link to comment
Share on other sites

Dear @@auzStar  (@Pelvis's )

 

The New code did its work.

great job!! thank you very much!!

 

I just note that this modification, pushes down the shopping-cart button very early. 

 

any clue?

 

Best Regards.

 

Valqui

:heart: Community Oscommerce fan :heart: You'll find the latest osC community version here.

 

Link to comment
Share on other sites

@@valquiria23

I just note that this modification, pushes down the shopping-cart button very early. 

 

Did you do it by resizing browser? But have you tried on the actual different sized devices?

It's to do with the changes in screen size and when the different screen sizes kick-in.

 

If your resizing browser, you'll notice that the products price does the same thing i.e. moves early (on latest BS EDGE).

 

Here's some info for you : http://getbootstrap.com/css/

 

cheers

My Add-ons
Advanced Cache Control Tool for osCommerce 2.3.x (non-bootstrap) Download Support
Ajax Product Listing for osC 2.3.4 (bootstrap) Download Support
Category New Products Carousel for osC 2.3.4 (bootstrap) Download Support
Category Popular Products Carousel for osC 2.3.4 (bootstrap) Download Support
Customer Testimonials for osCommerce 2.3.4 (bootstrap and non-bootstrap) Download Support
Front Page New Products Carousel for osC 2.3.4 (bootstrap) Download Support

Index Nested - Product Listing for osC 2.3.4 (bootstrapDownload Support
Match Categories in Search Results for osCommerce versions 2.3.x (non-bootstrap) Download Support
Modular Category Page for osC 2.3.4 (bootstrap)
Download Support

NEW Australia Post Shipping Modules for osCommerce 2.3.x (non-bootstrap) Download Support
NEW Equal Height Module for osC 2.3.4 (bootstrapDownload Support
Products Low Stock Report for osC 2.3.x (bootstrap and non-bootstrap) Download Support
Twitter Typeahead Autocomplete Search for osCommerce 2.3.4 (bootstrap and non-bootstrap)
Download Support

Upcoming Products Modules for osC 2.3.4 (bootstrap) Download Support

 
Assisted Add-ons
Scroll Boxes for osCommerce 2.3.x (bootstrap and non-bootstrap) Download Support
 
Bootstrap Add-ons created by other members
osCommerce Bootstrap Addons and Code

Link to comment
Share on other sites

  • 8 months later...

Archived

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

×
×
  • Create New...