Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

extra info at product listing


Darklings

Recommended Posts

Hi

 

Can someone tell me how i add the 'same' info as what you give in at admin and is shown in the product_info.php - to the product_listings.php???

 

I would like a new column added.

 

I already took a look at the contribs, and found two who do something simular - but not what i want and verry hard to install (after installing them, (tried bouth of them), i kept having all kinds of errors in my shop) and they dont have an admin to put in a discription....

 

Anyway - Imho - i think its not that hard to just get the info already in the db to another place... however when i copy/paste the same code as product_info uses to get its description from the db into my product_listings.php page it wont work :(

 

Maybe i forget something important here? i dont know... Can someone help me pls?

 

Thnx!

Kind Regards

Tom

Even in this dark place, yes, I am afraid of my own shadow.

 

 

 

Contributions | KnowledgeBase | osCommerce 2.2 pdf

Link to comment
Share on other sites

hi,

 

as it's not clear from u'r quote which one u want to add and in which table, anyway u can add any extra columns in u'r products table. and u can show it in product_info.php.

 

u can find an example of it in my developed site, www.ablekitchen.com

which contains 5 extra columns in that tables. so there is no problem in adding that.

 

:) arya

Link to comment
Share on other sites

Hi Arya,

 

Thnx for replying, but i guess i wasnt clear enouf..

 

I actualy meant - how do i show the product description in my product listing - as i want to skip the product_info page completely - to give the custommers less clicking.

Even in this dark place, yes, I am afraid of my own shadow.

 

 

 

Contributions | KnowledgeBase | osCommerce 2.2 pdf

Link to comment
Share on other sites

look at what the EZ new field contribution does, and replace short description by your regular description field ...

 

you have add the field to the sql string in index.php, decide to ignore it for sorting I guess and copy a section in the includes/modules/product_listing.php

deciding where and how to show the description field.

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Link to comment
Share on other sites

Wendy James

 

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.

Link to comment
Share on other sites

 

 

Yeah, i already checked the two most recent ones of them - but i have to say - they arent that easy to setup - i must be real dumb or something here - but neather of those i downloaded made any changes to the admin section - so i dont get where you can add the additional info - i asume directly in the db - witch i dont find a good idea ...

 

Anyway - i just thought it would be a lot easier just to 'MERGE' those two pages in one - since i need more then just a little info on my productlisting.. I want to completely remove the product_info page since, in our case, its a lost click. But to do that - i not only need the info on the productlistings but also a input for qty, and if there are attributes a attribute and a inlarge picture button......

 

I'm just not sure how 'easy' this merge between these two pages is - and i havent find anything simular yet in contributions - or i must have overlooked it.

 

Kind Regards,

tom

Even in this dark place, yes, I am afraid of my own shadow.

 

 

 

Contributions | KnowledgeBase | osCommerce 2.2 pdf

Link to comment
Share on other sites

Anyway - i just thought it would be a lot easier just to 'MERGE' those two pages in one - since i need more then just a little info on my productlisting.. I want to completely remove the product_info page since, in our case, its a lost click. But to do that - i not only need the info on the productlistings but also a input for qty, and if there are attributes a attribute and a inlarge picture button......

Tom, you have *no idea* what you are getting yourself into.

It's good to have some stretching goals, but for your v1 to go live with I suggest you keep the product info page, ensure all price calculations are correctly done.

Then you can start working on this ultimate product listing, you also need to consider that adding all of this will make the page pretty heafty to load, plus you'll need to add error checking etc to ensure attributes are selected when they should, and if not point back to the line item at fault ...

(I assume you want customers to select quantities and press add to cart once, or not ?)

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Link to comment
Share on other sites

Yes Carine,

 

Lol, it all looks so simple - but once you start with it :s haha

 

Anyway - i already made the popup and images display on the product_listing.php like they do on the product_info page... so no extra click anymore :D

 

If you click the 'add to card' button it goes directly in the shoppingcart... no problem there eather

 

I added a qty-input-box (like the one sppc/qty_Break did at the product_info page)

It even changes to the qtyblocks i gave in at admin (like when i'm not logged in, they are at qty 20 - but the buy button is gone cause i set the price to zero for guests, (guests cant order)) But when i log in - its not taking the qty to my shopping cart - for ex if i set it at 15 it shows 1 in my shoppingcart.. have to figure that out yet...

 

And one other 'small' ;) problem is: The product-description - i pasted the same code as in the product_info into the product_listing - but that wont work :( guess i have to make a call to the db i guess? but dont know how...

 

Imho - this last one should be verry simple - when you learn basic php its the first thing you learn - add stuff to the db and read it and post on your page... but with osc this is hell.... my info is already in the db... i just dont know how i read it and show on the site :s :s

Even in this dark place, yes, I am afraid of my own shadow.

 

 

 

Contributions | KnowledgeBase | osCommerce 2.2 pdf

Link to comment
Share on other sites

you have to add the product description column to the listing_sql in index.php in several places (for browse by categories, and by manufacturer), hardcoded, unless you want to sort on it too, than you can make it a bit more complicated.

Next, you need to show the field, that's done in includes/modules/product listing, but I'm guessing you must have that figured out by now.

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Link to comment
Share on other sites

you have to add the product description column to the listing_sql in index.php in several places (for browse by categories, and by manufacturer), hardcoded, unless you want to sort on it too, than you can make it a bit more complicated.

Next, you need to show the field, that's done in includes/modules/product listing, but I'm guessing you must have that figured out by now.

 

Hi Carine,

 

Well, i'm not working with manufacturers, so i can get rid of that... but what do you mean.. on the index.php page? i have to change something there too??

 

YEah, for showing the Field in includes/modules/product_listing.php i just copy pasted the one that is in the product_info.php page.

 

Kind Regards,

Tom

Even in this dark place, yes, I am afraid of my own shadow.

 

 

 

Contributions | KnowledgeBase | osCommerce 2.2 pdf

Link to comment
Share on other sites

Hi Carine,

 

Just checked my index.php - searched on 'listing'

i got this:

 

	$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, tmp_pp.products_price, p.products_tax_class_id, IF(tmp_pp.status, tmp_pp.specials_new_products_price, NULL) as specials_new_products_price, IF(tmp_pp.status, tmp_pp.specials_new_products_price, tmp_pp.products_price) as final_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd left join " . $product_prices_table . " as tmp_pp using(products_id), " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "'";  

 

DESCRIPTION is in there... so what is it i should add?

 

 

Kind Regards

Tom

Even in this dark place, yes, I am afraid of my own shadow.

 

 

 

Contributions | KnowledgeBase | osCommerce 2.2 pdf

Link to comment
Share on other sites

you have the TABLE_DESCRIPTION Included in order to be able to get the language specific products_name, however you still need to add pd.products_description to the list of fields selected.

 

So it should be something like:

 

 $listing_sql = "select " . $select_column_list . " pd.products_description,  p.products_id, p.manufacturers_id, tmp_pp.products_price, p.products_tax_class_id, IF(tmp_pp.status, tmp_pp.specials_new_products_price, NULL) as specials_new_products_price, IF(tmp_pp.status, tmp_pp.specials_new_products_price, tmp_pp.products_price) as final_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd left join " . $product_prices_table . " as tmp_pp using(products_id), " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "'";  

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Link to comment
Share on other sites

This is more of a suggestion, however some companies like myself are able to offer bespoke solutions as ideally osCommerce wouldnt suit to something like this.

 

www.everydayprint.co.uk is an example of what you are looking for and we have worked alongside them before.

 

Hope this helps?

 

Hi Carine,

 

yeah -i put in every listing i got at that index.php page -

in my product_listing.php i got:

 

$lc_text = 
'<table border="0" cellpadding="1" cellspacing="0" bgcolor="#660033">
 <tr>
   <td scope="col">' .
'<table border="0" cellpadding="0" cellspacing="0" bgcolor="#E4E5E6" width="500">
 <tr>
   <td rowspan="2" scope="col">' . $listing[$x]['products_name'] . '</td>
   <td colspan="2" scope="col"> <p>' . stripslashes($product_info['products_description']) . '</p><br><br></td>
<td scope="col">' . $lc_text = $pf->getPriceStringShort() . '</td>
 </tr>
 <tr>
   <td> </td>
   <td align="right"> </td>
   <td width="80">' . (($listing[$x]['products_price'] > 0) ? '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing[$x]['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> ' : ' ') . '</td>
 </tr>
</table>' .
'</td></tr></table>';

 

But not working :(

 

Am i doing something wrong with stripslashes($product_info['products_description']) ??? i got that from the product_info.php

 

 

Kind Regards,

tom

Even in this dark place, yes, I am afraid of my own shadow.

 

 

 

Contributions | KnowledgeBase | osCommerce 2.2 pdf

Link to comment
Share on other sites

Hi Carine,

 

yeah -i put in every listing i got at that index.php page -

in my product_listing.php i got:

 

$lc_text = 
'<table border="0" cellpadding="1" cellspacing="0" bgcolor="#660033">
 <tr>
   <td scope="col">' .
'<table border="0" cellpadding="0" cellspacing="0" bgcolor="#E4E5E6" width="500">
 <tr>
   <td rowspan="2" scope="col">' . $listing[$x]['products_name'] . '</td>
   <td colspan="2" scope="col"> <p>' . stripslashes($product_info['products_description']) . '</p><br><br></td>
<td scope="col">' . $lc_text = $pf->getPriceStringShort() . '</td>
 </tr>
 <tr>
   <td> </td>
   <td align="right"> </td>
   <td width="80">' . (($listing[$x]['products_price'] > 0) ? '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing[$x]['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> ' : ' ') . '</td>
 </tr>
</table>' .
'</td></tr></table>';

 

But not working :(

 

Am i doing something wrong with stripslashes($product_info['products_description']) ??? i got that from the product_info.php

Kind Regards,

tom

 

yes you are :)

 

on this page all the data is stored in the $listing array not in $product_info

 

so it should be

    <td colspan="2" scope="col"> <p>' . stripslashes($listing['products_description']) . '</p><br><br></td>

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Link to comment
Share on other sites

Yes, of course!!!! :blush:

 

But was not completely good, i had to :

 

<td colspan="2" scope="col"> <p>' . stripslashes($listing['products_description']) . '</p><br><br></td>

 

had to add [$x] to make it work :D

 

Now i only gota make the qty input field work, so that it takes the qty entered to my shopping cart and i'm finished :D :D

 

 

Greets, and thnx!

Tom

Even in this dark place, yes, I am afraid of my own shadow.

 

 

 

Contributions | KnowledgeBase | osCommerce 2.2 pdf

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...