Jump to content

andytc

Members
  • Content count

    248
  • Joined

  • Last visited

Everything posted by andytc

  1. Did you change your admin settings correcty as below ? "Set "Display Product Quantity" to a number different to 0 this display the quantity in stock of each product in product listing and are needed for work the conditional. Example: set to 4, and then change the 4 of "Display Buy Now column" to 5. Admin >> Configuration >> Stock: Set "Check stock level" to TRUE Set "Allow checkout" to FALSE and you made this change - OPEN file: catalog/includes/modules/product_listing.php FIND: $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> '; Comment out or REPLACE with: If (($listing['products_quantity']<>0) and ($listing['products_price'] > 0)){ $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> '; }else{ $lc_text = tep_image_button('out_stock.gif', IMAGE_BUTTON_OUT_STOCK) . ' '; } What is the name of your "buy now buttons" ? is it button_buy_now.gif ? as listed in the code above ?
  2. andytc

    Video Preview

    you could just add the code in the product description. did you try the contrib "display_video_extract" ? ... if you did , it didn't work for me either.
  3. andytc

    fast easy checkout

    in the install instructions for fec 3.2 is asks to find in checkout_confirmation.php - if ( ( is_array($payment_modules->modules) && (sizeof($payment_modules->modules) > 1) && !is_object($$payment) ) || (is_object($$payment) && ($$payment->enabled == false)) ) { tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, 'error_message=' . urlencode(ERROR_NO_PAYMENT_MODULE_SELECTED), 'SSL')); } i dont have this line only this - if ( ( is_array($payment_modules->modules) && (sizeof($payment_modules->modules) > 1) && !is_object($$payment) ) || (is_object($$payment) && ($$payment->enabled == false)) ) { tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(ERROR_NO_PAYMENT_MODULE_SELECTED), 'SSL')); } this difference is - FILENAME_CHECKOUT_SHIPPING is not in that line my code has - FILENAME_CHECKOUT_PAYMENT is this an error in the install files , my checkout_confirmation.php has never been edited and is standard. is it safe to go ahead and add the line ?
  4. well that was easy . My all products page is now working. i just needed to add the "p.products_quantity" to the code. another one down...3 to go :D
  5. Hi yes , the product listing is working for me ok. but i can't work out the code for the front page modules. i know nicko has it working on his demo page , so i'm hoping he can post a section of the code here. the install instructions don't include the front page modules. this probably won't help you HelleM, but in case it does , here is the code from my product_listing.php I know nico does answer questions here on his contribs, he's very helpful. <?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; //this change hides the quantity heading title $lc_text = ''; //this change hides the quantity heading title $lc_align = 'right'; 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') ) { $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; $has_description = false; 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, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a> '; } if (PRODUCT_LIST_DESCRIPTION && $listing['products_description'] && PRODUCT_LIST_DESCRIPTION_MAX_LENGTH) $lc_text .= '<br><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td class="productDesc">' . tep_flatten_product_description($listing['products_description'], ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing['products_id']) . '">' . TEXT_MORE . '</a>') . '</td></tr></table>'; 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_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 = ' ' . $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'] . ' '; // this hides stock quantity of product $lc_text = ' '; // this hides stock quantity of product 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, ($cPath ? 'cPath=' . $cPath . '&' : '') . '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'; If (($listing['products_quantity']<>0) and ($listing['products_price'] > 0)){ $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> '; }else{ $lc_text = tep_image_button('out_stock.gif', IMAGE_BUTTON_OUT_STOCK) . ' '; } break; } $list_box_contents[$cur_row][] = array('align' => $lc_align, 'params' => 'class="productListing-data"', 'text' => $lc_text); } } 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')) ) { ?> my only problem with product_listing is my "all products" page shows everything as out of stock , but i will look at that today
  6. I have it all working now , except for the front page modules do you have any code for the modules specials on default - star product and featured ? i can't find any instructions for these modules
  7. I've just tried this on the new products module... and it doesn't work at all. I get no changes at all , even if i set price to 0 and qty to 0 I made the changes in catalog/includes/modules/new_products.php The item still shows a buy now now button. I have "Individual boxes for products in central modules" installed. Nick ??? any help would be appreciated. I see it working on your test site so it must be possible
  8. I've checked through admin/catagories and it's all as it should be apart from one section of code that i had trouble with , maybe i've edited this incorrectly? It was clashing with the extra fields contrib , so i edited it as best i could. It all seemed to worked ok , so it took me awhile to realise that the catagory title and description were not working. this is the install instructions for the section that isn't quite right Around line 394, find this lines if (isset($HTTP_GET_VARS['pID']) && empty($HTTP_POST_VARS)) { $product_query = tep_db_query("select pd.products_name, pd.products_description, pd.products_url, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'"); $product = tep_db_fetch_array($product_query); Replace with the following //HTC BOC if (isset ($HTTP_GET_VARS['pID']) && (!$HTTP_POST_VARS) ) { $product_query = tep_db_query("select pd.products_name, pd.products_description, pd.products_head_title_tag, pd.products_head_desc_tag, pd.products_head_keywords_tag, pd.products_url, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'"); $product = tep_db_fetch_array($product_query); //HTC EOC And i have in place this..... <?php if ($action == 'new_product') { $parameters = array('products_name' => '', 'products_description' => '', 'products_url' => '', 'products_id' => '', 'products_quantity' => '', 'products_model' => '', 'products_image' => '', 'products_price' => '', 'products_weight' => '', 'products_date_added' => '', 'products_last_modified' => '', 'products_date_available' => '', 'products_status' => '', 'products_tax_class_id' => '', 'manufacturers_id' => ''); $pInfo = new objectInfo($parameters); if (isset ($HTTP_GET_VARS['pID']) && (!$HTTP_POST_VARS) ) { // START: Extra Fields Contribution $products_extra_fields_query = tep_db_query("SELECT * FROM " . TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS . " WHERE products_id=" . (int)$HTTP_GET_VARS['pID']); while ($products_extra_fields = tep_db_fetch_array($products_extra_fields_query)) { $extra_field[$products_extra_fields['products_extra_fields_id']] = $products_extra_fields['products_extra_fields_value']; } $extra_field_array=array('extra_field'=>$extra_field); $pInfo->objectInfo($extra_field_array); // END: Extra Fields Contribution //HTC BOC $product_query = tep_db_query("select pd.products_name, pd.products_description, pd.products_head_title_tag, pd.products_head_desc_tag, pd.products_head_keywords_tag, pd.products_url, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'"); $product = tep_db_fetch_array($product_query); //HTC EOC $pInfo->objectInfo($product); } elseif (tep_not_null($HTTP_POST_VARS)) { $pInfo->objectInfo($HTTP_POST_VARS); $products_name = $HTTP_POST_VARS['products_name']; $products_description = $HTTP_POST_VARS['products_description']; $products_url = $HTTP_POST_VARS['products_url']; } $manufacturers_array = array(array('id' => '', 'text' => TEXT_NONE)); $manufacturers_query = tep_db_query("select manufacturers_id, manufacturers_name from " . TABLE_MANUFACTURERS . " order by manufacturers_name"); while ($manufacturers = tep_db_fetch_array($manufacturers_query)) { $manufacturers_array[] = array('id' => $manufacturers['manufacturers_id'], 'text' => $manufacturers['manufacturers_name']); } $tax_class_array = array(array('id' => '0', 'text' => TEXT_NONE)); $tax_class_query = tep_db_query("select tax_class_id, tax_class_title from " . TABLE_TAX_CLASS . " order by tax_class_title"); while ($tax_class = tep_db_fetch_array($tax_class_query)) { $tax_class_array[] = array('id' => $tax_class['tax_class_id'], 'text' => $tax_class['tax_class_title']); } $languages = tep_get_languages(); if (!isset($pInfo->products_status)) $pInfo->products_status = '1'; switch ($pInfo->products_status) { case '0': $in_status = false; $out_status = true; break; case '1': default: $in_status = true; $out_status = false; } ?> I've posted a bit more code than the contribs modify. could this be where the problem lies or should i be looking in another section of admin/catagories ? Only one catagory is working and this has a sub-catagory , it is the only sub-catagory on the site. all the others don't have subs....don't know if this gives a clue ? but the sub-catagories themselves don't have a title either.... :blink: any help appreciated ... even a hint where to look cheers
  9. sorry jack ...post lag ..missed your reply . thanks i'll go and check it out.
  10. Jack? any idea where i've gone wrong in the catagory titles not showing ? is there any other file other than index.php that controls the catagory title ? i've checked my install and it all looks fine , i'm getting no errors , just no catagory title showing.
  11. The file you need to look at is catalog/index.php not sure what you've done , prolly pasted the code in the wrong place. go over the install instructions for index.php.
  12. I'm not getting the catagory name or description showing on the page ? what could be the reason ? the code is in place ? Have i missed something?
  13. andytc

    [Contribution] Extra Fields

    Is it possible to split the extra fields into 2 columns instead of one long list on the product info page ? i think it's in here somewhere ? // START: Extra Fields Contribution v2.0b - mintpeel display fix $extra_fields_query = tep_db_query(" SELECT pef.products_extra_fields_status as status, pef.products_extra_fields_name as name, ptf.products_extra_fields_value as value FROM ". TABLE_PRODUCTS_EXTRA_FIELDS ." pef LEFT JOIN ". TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS ." ptf ON ptf.products_extra_fields_id=pef.products_extra_fields_id WHERE ptf.products_id=". (int) $products_id ." and ptf.products_extra_fields_value<>'' and (pef.languages_id='0' or pef.languages_id='".$languages_id."') ORDER BY products_extra_fields_order"); while ($extra_fields = tep_db_fetch_array($extra_fields_query)) { if (! $extra_fields['status']) // show only enabled extra field continue; echo '<tr> <tr> <td class="main" align="left" vallign="middle"><b><font size="1" color="#FF9900">'.$extra_fields['name'].': </b></font>'; echo '<b><font size="1" color="#000000">' .$extra_fields['value'].'<BR></b></font> </tr> </td> </tr>'; } // END: Extra Fields Contribution - mintpeel display fix
  14. Thanks for the upadate to product info page Nicko :thumbsup: all working fine. Is there a way to show it in 2 rows or columns ...like the specials page ?
  15. Hi Just installed ver 2.5.9 . all went ok , a few probs but most worked out. Noticed this was a problem for me though... in the admin install instructions... Around line 394, find this lines if (isset($HTTP_GET_VARS['pID']) && empty($HTTP_POST_VARS)) { Replace with the following //HTC BOC if (isset ($HTTP_GET_VARS['pID']) && (!$HTTP_POST_VARS) ) { A ! found its way in on that replace line , don't know if it's supposed to be there , but i got an error with it in place. anyone have HTC working with Tinymce installed for product descriptions? My HTC tag entry boxes have all turned into WYSIWYG editors :o , they work ok , but i now have 4 Tinymce boxes all lined up on my product info page in admin :blink: and its a bit overkill ... i tried changing the HTC entries "tep_draw_textarea_field" in admin catagories to "tep_draw_input_field" , this removed the tinymce boxes , but left the text "soft" pre filled and although i can enter new tags that do show on the pages , they aren't remembered when i return to admin...they just revert back to "soft". can i edit other files to have these as input fields rather that text area ? cheers
  16. Try "dangling carrot" for free gifts at pre determined price levels. Search the contrib section for it
  17. are you using a shipping by weight method ? or have zone shipping ? if no weight is entered for the item it can't calculate the shiping costs or the zone chosen isn't listed as shipping destination .. something like that anyway. check through your shipping options and see wht you have selected. if it's weight then make sure the item has a weight entered.
  18. andytc

    Featured Product Support v1.5.4

    Thats great ! many thanks. :thumbsup:
  19. hi , I have image magic installed on another shop running version 1.1 and it all works fine. I am now setting up on a new server and installed tomjmul's version of 7 Nov 2006. Nothing worked for me with this version. I am running with PHP 5 and Mysql 5. Even with all the fixes to error reporting and the mysql fixes sorted (dont think they are related, but anyway...) it would not function for me. I removed it and installed V1.1 and it all worked straight away , on PHP 5 with Mysql 5. I had to create and CHMOD the thumbnail DIR myself, but other than that it all worked out of the box. Anyone having trouble , perhaps try an earlier version. I can no longer find V1.1 in the contrib section. BTW . the latest install instructions don't seem to be as clear and concise as the old , especially the image wrapper function instructions, earlier versions state clearly what should be changed , this latest one doesn't , it only instructs to replace the entire image wrapper function , ok if you are experienced , but for a newb a bit confusing and some could end up with problems. cheers
  20. andytc

    Featured Product Support v1.5.4

    nicko107 ? Hi , I have installed all of your layout contribs for individual boxes with descriptions , including specials and featured on main page... great stuff and all working fine. is it possible to have individual boxes on the actual featured_products.php page , the same as on the specials.php page ? cheers
  21. I found this in the contrib section, but can't remember where and now cant find it again, so i'll show it all here. I just added the section for comments to invoice.php and used this contrib by PandA.nl This mod adds all order comments (customer's and yours) to the bottom of the invoice. It is a very easy install, and makes it easier to use the invoice as a packing slip without missing the special requests customers leave in the comments area. It is also a professional looking way to send a comment or reply back with the order, since the comments you add to the order will display here also. I honestly have no idea how this mess works, as I reverse-engineered it out of the orders.php file. It looks good though, and thats what counts. :-) INSTALLATION: OPEN: catalog/admin/invoice.php AT LINE 137, AFTER: ?> </table></td> </tr> BUT BEFORE: </table></td> ADD: <tr> <td class="smallText" align="center" colspan="8"><b><?php echo TABLE_HEADING_COMMENTS; ?></b></td> </tr> <?php $orders_history_query = tep_db_query("select orders_status_id, date_added, customer_notified, comments from " . TABLE_ORDERS_STATUS_HISTORY . " where orders_id = '" . tep_db_input($oID) . "' order by date_added"); if (tep_db_num_rows($orders_history_query)) { while ($orders_history = tep_db_fetch_array($orders_history_query)) { echo ' <tr>' . "\n" . ' <td class="smallText" align="center" colspan="8"><table width=50% border="1" cellpadding="0" cellspacing="0"><tr><td class="smallText" align="center">' . nl2br(tep_db_output($orders_history['comments'])) . ' </td></tr></table></td>' . "\n" . ' </tr>' . "\n"; } } else { echo ' <tr>' . "\n" . ' <td class="smallText" colspan="5">' . TEXT_NO_ORDER_HISTORY . '</td>' . "\n" . ' </tr>' . "\n"; } ?> OTHER SUGGESTIONS: I include the invoice in the package instead of the packing slip (I just like the prices on the page) and I take advantage of this by placing a generic message to the customers underneath the comments. To do this: AFTER: </tr></table> BUT BEFORE: <!-- body_text_eof //--> ADD: <center><br><br><br><br> Thank you for shopping at the YOUR STORE HERE!<br> Your message to the customer<br> More reasons to come back<br> (I include a coupon code for their next visit)<br><br> YOUR NAME</center> Thanks to everyone who has contributed to the community! Jeff Stein 4/24/05 www.xboxchopshop.com A bit late late with my reply to this question , but it might help others who want to do the same. Just place the code for the comments wherever you want them to appear on your invoice.
  22. Hi Is the latest full package this one ? yesudo 31 Oct 2006 (Updated to include fix posted by Randelia on 7/Nov/05)
  23. Can anyone tell me what version to install , the contrib section is very confusing. I've tried various versions and upgrades and i'm not having much luck. Some of the packages don't seem to be complete , where earlier versions had files to run to install the database settings , others don't ? If it makes any difference i'm running PHP Version 5.1.6 If anyone can tell me which package or packages to install i'd be grateful :)
  24. andytc

    Dynamic SiteMap

    ah-ha ! I'm using v2.0 7 Jul 2006 .... i thought this was a full package
×