Guest Posted September 7, 2003 Share Posted September 7, 2003 Okay, I got this mod to work because of this forum and only because of this forum. This mod makes it possible to add a retail price to your items and then it calculates how much money you are saving by purchasing this item out of the store. I successfully got it to do what the mod was made to do and that is display this price on the product info page. Now, I want to take this mod a bit further than that. I want to be able to display these three variables on the product list, and anywhere else that these products are listed. I ahve tryed a lot of things to get this to work, but nothing seems to help. If someone coulse PLEASE help me out on this, I would really appritiate it. The name of the mod that I used is EZ New Fields. You can check it out by click that link. I have the PHP to display all three variables on the product info page. I just need to know how to integrate this PHP into the other areas of the site. I figure I need to mess around with the 'case' things in includes/modules/product_listings.php. If someone could please help me, that would be great. http://www.jessedidthis.com/catalog/produc.../products_id/10 - my product info page http://www.jessedidthis.com/catalog/index.....php/cPath/3_10 - my product listing page Quote Link to comment Share on other sites More sharing options...
Guest Posted September 7, 2003 Share Posted September 7, 2003 You will need to make changes to both index.php, and as you say, product_listing.php. The easiest way to learn to do this is to choose an existing attribute, such as 'products_model' and to duplicate this, making appropriate name changes as you go. You will also need to add changes to the configuration table in your database - again, look at something like 'products_model' - perhaps you may wish to look at oscommerce.sql for this, or use PhpMyAdmin directly. I assume you have already made changes to admin/categories.php Assuming you are successful with this, please consider contributing your changes back to the community. Matti Quote Link to comment Share on other sites More sharing options...
Guest Posted September 7, 2003 Share Posted September 7, 2003 http://rolrand.surplusalert.com/?c=default...=index&r=537061 - That is what I am trying to do. Still can't figure it out. Here is the code that I have been messing around with. case 'PRODUCT_LIST_PRICE': $lc_align = 'right'; if (tep_not_null($listing['specials_new_products_price'])) { $lc_text = ' <s>' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span> '; } else { $lc_text = ' Retail Price: <s>' . $currencies->display_price($listing['products_retail_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</s> <br> Our Price: <span class="productSpecialPrice">' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span> '; } break; Now, that SHOULD work, but it doesn't. It points to the currect table as well. Please try to send some more help. Thank you. Here is the output I'm getting from that code. http://www.jessedidthis.com/catalog/index.....php/cPath/3_10 as you can see, the retail price shows up as Zero, and there is a value set to that. Thank you. Now, I still have to be able to display how much they are saving as well. I have all the PHP to display this on the product info page, but it doesn't work on the listings. Here is the link for the products info page. http://www.jessedidthis.com/catalog/produc.../products_id/10 thanks for the help. Quote Link to comment Share on other sites More sharing options...
Guest Posted September 9, 2003 Share Posted September 9, 2003 still haven't received any help on this. Could someone PLEASE take a look at the code and help me out. Quote Link to comment Share on other sites More sharing options...
Guest Posted September 10, 2003 Share Posted September 10, 2003 still haven't received any help on this. Could someone PLEASE take a look at the code and help me out. It is quite some work you are asking somebody to do for you :shock: Quote Link to comment Share on other sites More sharing options...
Guest Posted September 11, 2003 Share Posted September 11, 2003 I don't expect anyone do to it, I just need someone that knows osCommerce a little better to maybe point out what I am missing. I honestly don't know why this part wasn't included in the contribution, but as soon as I figure it out, I'll be sure that it is included. But, I first need someone to help me figure it out. PLEASE... this is urgent. Quote Link to comment Share on other sites More sharing options...
Ajeh Posted September 11, 2003 Share Posted September 11, 2003 Looks like you have a typo so you are getting the value of $0.00 on the price. It depends on what version of osCommerce you are working with and what you are using for the products_listing.php Check the name of the array being used and see if you have used the wrong name when you copied your code from product_info.php over to products_listing.php Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.