Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Column listing for products_new.php


L!mit

Recommended Posts

Hello,

 

I have tried countless times to make products_new.php list in columns instead of in rows. I have seen contributions for product listings in columns, but nothing for products_new.php .

 

Does anyone know a way to do this? I have spent countless hours trying to accomplish this, but have had no luck I am still new to php.

 

Any help would be greatly appreciated!

Link to comment
Share on other sites

  • 4 years later...

Hi,

 

Did you ever get anywhere with this? I'm searching now but can't find anything. I've already done my product_listing.php and now I want to copy it for the products_new.php page as well.

 

Any help would be grately appreciated!

Link to comment
Share on other sites

Thats included in Product Listing Enhancements, Thumbnails & Manufacturer Headings http://addons.oscommerce.com/info/6051

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

Thanks for the reply but i've looked at this contrib and can't find the code I need to remove in order to make a double column listing... I can't install that contrib as I already have a heavily modified store.

 

The page I am trying to "mimic" is my version of product_listing.php which you can see here: http://www.zerooneairsoft.com/index.php?cPath=287&osCsid=bbc669c39c1e59515615f4ba6171eb10

 

For some reason that page and the other pages seem to be of a different design >.<

Link to comment
Share on other sites

 

The products_new.php included in that contrib is modified to call the product_listing module, as u have already modified that module, simply use that products_new.php file

 

 

If you don't want to run the install to apply the dbase changes, simply modify the file, ie it has:

 

if (strstr(PRODUCT_THUMBNAIL_VIEW, 'thumbnails')) {

 

change to

if (1 == 1) {

 

All the included files were originally from the 2.2rc2a distrib, if you have made changes from the standard format, just apply same to the included files u use.

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

Hi Sam,

 

Thanks for the reply. I've got the page displaying the product_listing.php module now, but it's looping http://www.zerooneairsoft.com/products_new.php?osCsid=f25d8e198b92ec2dd8889296b391fca5 as you can see. I think it must be a "while" statement? But can't trace where in the products_new.php the problem would be?

Link to comment
Share on other sites

Hi Sam,

 

Thanks for the reply. I've got the page displaying the product_listing.php module now, but it's looping http://www.zerooneai...8889296b391fca5 as you can see. I think it must be a "while" statement? But can't trace where in the products_new.php the problem would be?

 

 

The problem looks typical of failing to close tabe elements you have opened in the correct place, check your code & that u don't have any invalid nesting.

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

I'm pretty confident it isn't product_listing.php as it is working correctly elsewhere. I've not touched any tables in your products_new.php yet, however if I comment out these three lines in the same file, the page will load correctly (albeit with no products shown) but the borders & table layout do show correctly...?

 

Many thanks for your help on this.

 

Lines 56-58:

    while (list($key, $value) = each($define_list)) {
     if ($value > 0) $column_list[] = $key;
   } 

Link to comment
Share on other sites

All fixed, just posting this for the benefit of anyone searching in the future :).

 

The file just needed the following (around line 50) changing for the order of the new custom layout, and any extras added:

 

$define_list = array('PRODUCT_LIST_NAME' => PRODUCT_LIST_NAME,
             'PRODUCT_LIST_IMAGE' => PRODUCT_LIST_IMAGE,
	     'PRODUCT_LIST_PRICE' => PRODUCT_LIST_PRICE,
	     'PRODUCT_LIST_PRICE_B' => PRODUCT_LIST_PRICE_B,
                    'PRODUCT_LIST_QUANTITY' => PRODUCT_LIST_QUANTITY,
	     'PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL,
                    'PRODUCT_LIST_BUY_NOW' => PRODUCT_LIST_BUY_NOW);

Link to comment
Share on other sites

I'm pretty confident it isn't product_listing.php as it is working correctly elsewhere. I've not touched any tables in your products_new.php yet, however if I comment out these three lines in the same file, the page will load correctly (albeit with no products shown) but the borders & table layout do show correctly...?

 

Many thanks for your help on this.

 

Lines 56-58:

    while (list($key, $value) = each($define_list)) {
     if ($value > 0) $column_list[] = $key;
   } 

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

All fixed, just posting this for the benefit of anyone searching in the future smile.gif.

 

The file just needed the following (around line 50) changing for the order of the new custom layout, and any extras added:

 

$define_list = array('PRODUCT_LIST_NAME' => PRODUCT_LIST_NAME,
                'PRODUCT_LIST_IMAGE' => PRODUCT_LIST_IMAGE,
         'PRODUCT_LIST_PRICE' => PRODUCT_LIST_PRICE,
         'PRODUCT_LIST_PRICE_B' => PRODUCT_LIST_PRICE_B,
                	'PRODUCT_LIST_QUANTITY' => PRODUCT_LIST_QUANTITY,
         'PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL,
                	'PRODUCT_LIST_BUY_NOW' => PRODUCT_LIST_BUY_NOW);

 

Well done, I would just caution that just missing the columns u have added should not have caused your error, the column should just simply have not appeared, it implies your product_listing.php doesn't follow all the rules!!

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...