Jump to content

mdscarrott

Members
  • Content count

    34
  • Joined

  • Last visited

Everything posted by mdscarrott

  1. Hi Spooks. I have spent the day playing with the contribution on my local test site and have been very impressed. There are however a couple of things that are preventing me from going live an i was hoping you coul dhelp me please. 1. If a product is on special with a discount prive it shows in the relevant category view but not on the new products module on the homepage. 2. I have the contribution salemaker installed and can not for the life of me work out how to get the price reductions incldued in the product listing or new product modules 3. I would like to be able to remove the option to select a page from beneath the new products module on the home page so that if it is set to only show 4 prodcuts then that is all it shows without the option to click through pages and find more. Some one asked about this a page or so back and you suggested some code to replace but i couldn't find it to replace so thought i could ask again in case i had misunderstood. I have included below the examples of my existing product listing and new products modules that i am trying to amend which show how i currenlyt display the prices generate by the salemaker contribution which i am trying to replicate now within my new product listing and new product files. Old New PRoducts Module: <?php /* $Id: new_products.php 1806 2008-01-11 22:48:15Z hpdl $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2008 osCommerce Released under the GNU General Public License */ ?> <!-- new_products //--> <?php if ( (!isset($new_products_category_id)) || ($new_products_category_id == '0') ) { $new_products_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, pd.products_name, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by RAND() limit " . MAX_DISPLAY_NEW_PRODUCTS); } else { $new_products_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, pd.products_name, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . (int)$new_products_category_id . "' and p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS); } $row = 0; $col = 0; $info_box_contents = array(); while ($new_products = tep_db_fetch_array($new_products_query)) { $special_price = tep_get_products_special_price($new_products['products_id']); if ($special_price) { $products_price = '<s>' . $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($special_price, tep_get_tax_rate($new_products['products_tax_class_id'])) . '</span>'; } else { $products_price = '<span class="productPrice">' . $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])). '</span>'; } $info_box_contents[$row][$col] = array('align' => 'center', 'params' => 'class="smallText" width="' . round(100/(MAX_DISPLAY_NEW_PRODUCTS_PER_ROW), 0). '%" valign="top"', 'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $new_products['products_image'], $new_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . $new_products['products_name'] . '</a><br>' . $products_price); $col ++; if ($col > (MAX_DISPLAY_NEW_PRODUCTS_PER_ROW - 1)) { $col = 0; $row ++; } } new contentBox($info_box_contents); ?> <!-- new_products_eof //--> Old Product Listing: <?php /* $Id: product_listing.php 1739 2007-12-20 00:52:16Z hpdl $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ $listing_split = new splitPageResults($listing_sql, MAX_DISPLAY_SEARCH_RESULTS, 'p.products_id'); if ( ($listing_split->number_of_rows > 0) && ( (PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3') ) ) { ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="smallText"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></td> <td class="smallText" align="right"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td> </tr> </table> <?php } $list_box_contents = array(); for ($col=0, $n=sizeof($column_list); $col<$n; $col++) { switch ($column_list[$col]) { case 'PRODUCT_LIST_MODEL': $lc_text = TABLE_HEADING_MODEL; $lc_align = ''; break; case 'PRODUCT_LIST_NAME': $lc_text = TABLE_HEADING_PRODUCTS; $lc_align = ''; break; case 'PRODUCT_LIST_MANUFACTURER': $lc_text = TABLE_HEADING_MANUFACTURER; $lc_align = ''; break; case 'PRODUCT_LIST_PRICE': $lc_text = TABLE_HEADING_PRICE; $lc_align = 'center'; break; case 'PRODUCT_LIST_QUANTITY': $lc_text = TABLE_HEADING_QUANTITY; $lc_align = 'right'; break; case 'PRODUCT_LIST_INFO': $lc_text = 'More Info'; $lc_align = 'center'; break; case 'PRODUCT_LIST_WEIGHT': $lc_text = TABLE_HEADING_WEIGHT; $lc_align = 'right'; break; case 'PRODUCT_LIST_IMAGE': $lc_text = TABLE_HEADING_IMAGE; $lc_align = 'center'; break; case 'PRODUCT_LIST_BUY_NOW': $lc_text = TABLE_HEADING_BUY_NOW; $lc_align = 'center'; break; } if ( ($column_list[$col] != 'PRODUCT_LIST_BUY_NOW') && ($column_list[$col] != 'PRODUCT_LIST_IMAGE') && ($column_list[$col] != 'PRODUCT_LIST_INFO')) { $lc_text = tep_create_sort_heading($HTTP_GET_VARS['sort'], $col+1, $lc_text); } $list_box_contents[0][] = array('align' => $lc_align, 'params' => 'class="productListing-heading"', 'text' => ' ' . $lc_text . ' '); } if ($listing_split->number_of_rows > 0) { $rows = 0; $listing_query = tep_db_query($listing_split->sql_query); while ($listing = tep_db_fetch_array($listing_query)) { $rows++; if (($rows/2) == floor($rows/2)) { $list_box_contents[] = array('params' => 'class="productListing-even"'); } else { $list_box_contents[] = array('params' => 'class="productListing-odd"'); } $cur_row = sizeof($list_box_contents) - 1; for ($col=0, $n=sizeof($column_list); $col<$n; $col++) { $lc_align = ''; switch ($column_list[$col]) { case 'PRODUCT_LIST_MODEL': $lc_align = ''; $lc_text = ' ' . $listing['products_model'] . ' '; break; case 'PRODUCT_LIST_NAME': $lc_align = ''; if (isset($HTTP_GET_VARS['manufacturers_id'])) { $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a>'; } else { $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a> '; } break; case 'PRODUCT_LIST_MANUFACTURER': $lc_align = ''; $lc_text = ' <a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing['manufacturers_id']) . '">' . $listing['manufacturers_name'] . '</a> '; break; case 'PRODUCT_LIST_PRICE': $lc_align = 'center'; if (tep_get_products_special_price($listing['products_id'])) { $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(tep_get_products_special_price($listing['products_id']), tep_get_tax_rate($listing['products_tax_class_id'])) . '</span> '; } else { $lc_text = ' ' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . ' '; } break; case 'PRODUCT_LIST_QUANTITY': $lc_align = 'right'; $lc_text = ' ' . $listing['products_quantity'] . ' '; break; case 'PRODUCT_LIST_INFO': $lc_align = 'center'; $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_image_button('button_more_info.gif', 'More Info') . '</a> '; break; case 'PRODUCT_LIST_WEIGHT': $lc_align = 'right'; $lc_text = ' ' . $listing['products_weight'] . ' '; break; case 'PRODUCT_LIST_IMAGE': $lc_align = 'center'; if (isset($HTTP_GET_VARS['manufacturers_id'])) { $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>'; } else { $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a> '; } break; case 'PRODUCT_LIST_BUY_NOW': $lc_align = 'center'; /** original **/ //$lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> '; /** show-soldout-v1.0 **/ if($listing['products_quantity'] <= 0 || $listing['products_status']==0) $lc_text = tep_image_button('button_sold_out_sm.gif', IMAGE_BUTTON_SOLD_OUT) . ' '; else $lc_text = ' <a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> '; /** end show-soldout-v1.0 **/ break; } $list_box_contents[$cur_row][] = array('align' => $lc_align, 'params' => 'class="productListing-data"', 'text' => $lc_text); } if ($listing_split->number_of_rows > $rows) { $list_box_contents[][] = array( 'params' => 'valign="middle" colspan="' . sizeof($column_list) . '"', 'text' => tep_draw_separator('pixel_silver.gif', '100%', '1') ); } } new productListingBox($list_box_contents); } else { $list_box_contents = array(); $list_box_contents[0] = array('params' => 'class="productListing-odd"'); $list_box_contents[0][] = array('params' => 'class="productListing-data"', 'text' => TEXT_NO_PRODUCTS); new productListingBox($list_box_contents); } if ( ($listing_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3')) ) { ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="smallText"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></td> <td class="smallText" align="right"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td> </tr> </table> <?php } ?> Any help gratefully recieved. Matt S
  2. mdscarrott

    [Contribution] Mindsparx admin

    Good idea. I will do soon. Matt S
  3. mdscarrott

    [Contribution] Mindsparx admin

    Okay - i have solved the issue with the SSL constantly throwing up errors making it unusable in IE. In admin/includes/header.php at about line 59 is the following: <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script>'>http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script> <script type="text/javascript" src="mindsparx_admin/template/<?php echo ADMIN_TEMPLATE?>/js/ddsmoothmenu.js"> This refers to a .js file that is not in the store and is accessed by http not https. To fix the problem i downloaded the file from http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js by pasting that in the a browser window and saved the file to admin/mindsparx_admin/template/<YOUR CHOSEN TEMPLATE>/js/ the same path as the ddsmoothmenu.js file referenced in the second line of original text above. I then just changed the original lines of code to: <script type="text/javascript" src="mindsparx_admin/template/<?php echo ADMIN_TEMPLATE?>/js/jquery.min.js"></script> <script type="text/javascript" src="mindsparx_admin/template/<?php echo ADMIN_TEMPLATE?>/js/ddsmoothmenu.js"> and everything is looking good. Hope this helps anyone else having a problem with SSL in Mindsparx Admin for OSCommerce. Matt S
  4. mdscarrott

    [Contribution] Mindsparx admin

    I am having exactly the same problem. Can anyone help please. It is the first time i have tried to use SSL and this is my first store. It is giving me a mixed cotent error and diabling the menu drop downs. Help appreciated. Matt S
  5. mdscarrott

    [Contribution] Mindsparx admin

    Please help - i really dont know where to start and have been trying to fix this for days now and have yet to make any progress. Info: Store: 2.2 rc.2a Various mods but nothing too heavy. Fist time store so learning as go and lerning php through trial and error. Problem: Midsparx admin worked great locally on my test machine - I have now uploaded to a hosted 'live' environment. Store looks fine, DB uplaoded fine, admin fine although.... the images for buttons are not showing up. On the index page - using the blue template - the green links across the top all show up fine, the logo is gine, but the buttons for packign slip, invoice etc are not downloading. Right clicking and selecting properties shows the image path as http://admin/mindsparx_admin/template/blue...packingslip.gif which is missing out the website URL completely. What has gone wrong and where so I go to address this? As mentioned the url for the other images on the page are all fine. Please help - i'm not sleeping trying to sort this without really knowing what i am looking for, Many thanks - and thank you for a great contibution. Matt S
  6. mdscarrott

    [Contribution] TinyMCE Anywhere

    Hi All I am having a problem that i don't think anyone else has mentioned. I have installed TinyMCE using ACA and have got ibrowser workign find in the main test area for adding new products or editing existing products. I am however struggling to get this to work for the product image upload. Were before there was a 'browse' button to look up an image file there is now just a text box which doesn't allow me to do anything other than type in it. I'm guessing there should be an ibrowser type interface here. What i get at the moment can be seen here: http://cid-de321b4addc3297c.skydrive.live....lic/Capture.JPG Please help. Matt
  7. Hi all I'm a little worried that the last post on this board was a long time ago and it might not be getting monitred any more. Here goes though, i hope someone can help me because this really is driving me mad. I have installed ACA, no probs and i'm using the TinyMCE module and love the whole thing. The problem i have though is when editing a product or creating a new one. Befdore installing ACA i would upload an image by clicking the browse button at the bottom of the page, browsing my local pc before OSC would then take over, chage the size and upload as the product image to be used in the description and the product list pages. Now however the 'browse' button is not there, and instead i am just provided with a text box that shows the path for the existing saved file. Not helpful if i want to add a new file. I can't find a way around this. Please help, i'm in desperate need. Thanks in advance. Matt S
×