Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Enabling 'Display Product Price' breaks site - 2.3.4 BS (includes/modules/product_listing.php)


ChristaMJ

Recommended Posts

Hi all, I'm looking for a bit of help here - I have upgraded my shop to Gburton's responsive 2.3.4 and it's really terrific, but I am having trouble with my product listings. I just updated to the most recent version and one of the files that was updated is /includes/modules/product_listing.php
 
It works fine until I enable the 'display product price' in the product listing configuration. If I enable that none of my products display or anything (footer, ect) after that. 
 
I think there is something wrong in this portion of the code but I'm a little dumb, so any help on fixing it would be mightily appreciated. Here's what I suspect is the problematic code (and the reason I think this is because if I comment out this portion of code, the price doesn't display, but everything else works): 
 

       if (PRODUCT_LIST_PRICE > 0) {

        if (tep_not_null($listing['specials_new_products_price'])) {
          $prod_list_contents .= '      <div class="col-xs-6" itemprop="offers" itemscope itemtype="http://schema.org/Offer"><metaitemprop="priceCurrency" content="' . tep_output_string($currency) . '" /><div class="btn-group" role="group"><button type="button" class="btn btn-default"><del>' .  $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</del></span>  <span class="productSpecialPrice" itemprop="price" content="' . $currencies->display_raw($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '">' . $currencies->display_price($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span></button></div></div>';
        } else {
          $prod_list_contents .= '      <div class="col-xs-6" itemprop="offers" itemscope itemtype="http://schema.org/Offer"><metaitemprop="priceCurrency" content="' . tep_output_string($currency) . '" /><div class="btn-group" role="group"><button type="button" class="btn btn-default"><span itemprop="price" content="' . $currencies->display_raw($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '">' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span></button></div></div>';
        }
      }

 

 
 
Is there a missing bracket or typo in here that anyone can spot? 
 
 
Link to comment
Share on other sites

I see 2 instances of this code

 

--> <metaitemprop="priceCurrency" content="' <--

 

and in Gburton's latest edge code I just downloaded it has an extra space in there like this

 

--> <meta itemprop="priceCurrency" content="' <-- Not sure if that is the issue, but that is all I can come up with from what you have in your post to try.

Link to comment
Share on other sites

Is there really supposed to be a <meta> tag within the <body> (within a <div>)? That seems odd to me, but possibly it will work. At least, make sure there's a space between meta and itemprop, and see if that helps.

Link to comment
Share on other sites

Thanks everyone for the help! 

 

Burt, your guess was correct. I've created a fork on github, because I had to make a few changes for my shop, but I haven't really figured it all out yet, so I didn't retrieve all of the updated files. I'll keep working on it. 

 

Since I've got you now, I'm wondering if I can improve my listing layout. I'd like it to be a bit more compact. Is there a way to remove the description and move the model, quantity and price beside the image- or would these changes need to be made by editing the product listing file directly? 

 

Here's a link to my shop: http://homeownersdiscount.net/ and if you click into the wood flooring category you can see what I'm referring to. 

 

Also, thank you so much for working on this project. If there is any way that I can contribute as a shop owner please let me know!

Link to comment
Share on other sites

@@ChristaMJ

 

Hi Christa,

 

I believe you should be able to use the Grid View Module in admin for that. Check in your Admin --> Modules --> Header Tags and see if you have the Grid List Javascript module available there and turn it on!

 

You can chose what other pages you want the grid list to show in there as well.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...