Forums / Templates, Stylesheets, Page Layout / Product Listing Page - Show "Starting at..." Text

Product Listing Page - Show "Starting at..." Text

Views: 1,399

Results 1 to 8 of 8
30 May 2012, 1:15 PM
#1
mortalwombat avatar

mortalwombat

Zen Follower

Join Date:
Jul 2010
Location:
Australia
Posts:
131
Plugin Contributions:
0

Product Listing Page - Show "Starting at..." Text

Hi

I've been looking around for a solution to this, but have only come across one thread that covers what I'm wanting to do, and it used a solution that is no good for me (find it here http://www.zen-cart.com/showthread.php?146906-Show-quot-Starting-At-quot-on-Product-Listing-Page).

The solution on that particular thread was altering the header text. What I want to do is the following:

If a product is available with two options -- let's say Small for $5 and Large for $10 -- the product listing page simply shows $5. Once inside the actual product description page, there is the "Starting at: $5" wording.

We have had feedback from our clients that the low price shown on the product listing page is misleading... We'd like to alter this so that the "Starting at" wording also shows on the product listing page.

Hoping someone has some ideas on how I can incorporate this.

Thanks in advance,
Tija

30 May 2012, 2:02 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Product Listing Page - Show "Starting at..." Text

You could customize the module:
/includes/modules/product_listing.php

using your templates and overrides and add the code in RED:

        case 'PRODUCT_LIST_PRICE':
        $lc_price = zen_get_products_display_price($listing->fields['products_id']) . '<br />';
        $lc_align = 'right';
if (zen_has_product_attributes($listing->fields['products_id'])) {
 $lc_price = TEXT_BASE_PRICE . $lc_price;
}
        $lc_text =  $lc_price;

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

31 May 2012, 6:40 AM
#3
mortalwombat avatar

mortalwombat

Zen Follower

Join Date:
Jul 2010
Location:
Australia
Posts:
131
Plugin Contributions:
0

Re: Product Listing Page - Show "Starting at..." Text

OK -- thanks for that, Ajeh.

The only problem is that the snippet of code you have supplied adds "Starting at..." to all products with attributes, not just the ones with differing prices through attributes.

Is there any way to modify the code a little so that it only shows the "Starting at..." wording on products that have priced attributes?

Thanks,
Tija

31 May 2012, 2:02 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Product Listing Page - Show "Starting at..." Text

Try using this code in RED:

        case 'PRODUCT_LIST_PRICE':
        $lc_price = zen_get_products_display_price($listing->fields['products_id']) . '<br />';
        $lc_align = 'right';
// bof: Add Starting at to prices with Attributes with prices
if (zen_has_product_attributes($listing->fields['products_id'])) {
  global $db;
  $chk_attributes = $db->Execute("SELECT products_id from " . TABLE_PRODUCTS_ATTRIBUTES . " WHERE products_id ='" . $listing->fields['products_id'] . "' and options_values_price !=0");
  if ($chk_attributes->RecordCount() > 0) {
    $lc_price = TEXT_BASE_PRICE . $lc_price;
  }
}
// eof: Add Starting at to prices with Attributes with prices
        $lc_text =  $lc_price;

        // more info in place of buy now

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

1 Jun 2012, 12:45 AM
#5
mortalwombat avatar

mortalwombat

Zen Follower

Join Date:
Jul 2010
Location:
Australia
Posts:
131
Plugin Contributions:
0

Re: Product Listing Page - Show "Starting at..." Text

Thanks -- that's works perfectly :hug:

  • Tija
1 Jun 2012, 12:47 AM
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Product Listing Page - Show "Starting at..." Text

Thanks for the update that this is now working for you ... :smile:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

11 Oct 2013, 11:04 PM
#7
willy12 avatar

willy12

New Zenner

Join Date:
Nov 2010
Posts:
64
Plugin Contributions:
0

Re: Product Listing Page - Show "Starting at..." Text

Thank you for this! I needed it as well!!

11 Oct 2013, 11:40 PM
#8
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Product Listing Page - Show "Starting at..." Text

You are most welcome ... thanks for the update that you too needed this and that it worked for you as well ...

Remember the Zen Cart Team when you are rich and famous ... :cool:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!