Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Link within Cart Content String


aftabn10

Recommended Posts

Hi, I was looking for some help in regards to adding a link to the shopping cart page if there any items showing within the shopping cart.

 

I have the following code (shopping cart page from header and footer contents module)

 

 

if ($cart->count_contents() > 0) {
        $cart_contents_string = '<p class="cart_img"></p><b><p class="cart">' . MODULE_HEADER_FOOTER_CONTENTS_SHOPPING_CART_TITLE . '</b> <br/>'. $cart-> count_contents() . ' ' . MODULE_HEADER_FOOTER_CONTENTS_SHOPPING_CART_ITEMS . ' </p>';        
      } else {

 

What i would like to do is to add the following link within this code in order for users to select the no of items to take them to the shopping cart.

 

 

tep_href_link(FILENAME_SHOPPING_CART)

 

but unfortunately I am not sure where to add the <a href

 

If somebody could please advise, would really appreciate it.

 

Thanks in advance.

Link to comment
Share on other sites


 

if ($cart->count_contents() > 0) {

$cart_contents_string = '<p class="cart_img"></p><p class="cart"><a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '"><b>' . MODULE_HEADER_FOOTER_CONTENTS_SHOPPING_CART_TITLE . '</b> <br/>'. $cart-> count_contents() . ' ' . MODULE_HEADER_FOOTER_CONTENTS_SHOPPING_CART_ITEMS . '</a> </p>';

} else {

$cart_contents_string = '';

}

 

echo $cart_contents_string;

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

Archived

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

×
×
  • Create New...