Jump to content

dennis@dhlhomefurnishings.

Members
  • Content count

    44
  • Joined

  • Last visited

  1. dennis@dhlhomefurnishings.

    Problem with editprice.php

    Hello Jim Thank you for your reply. I changed the code as you suggested and now works ok. Don't know how it worked in php 5.2 but as that is history it doesn't really matter Thanks again ... Dennis
  2. dennis@dhlhomefurnishings.

    Problem with editprice.php

    Hello Chris Thanks for your reply The reason I put the issue into General "add ons" is because it is not an oscommerce core file. I copied the contents of the file from Dreamweaver. Dreamweaver says there are 189 lines and I checked the content of thef file and it is the same as I pasted above. Does your application ignore white space - maybe thats why there is a difference ? line 189 is the last line in the file ie <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> Best Regards ... Dennis
  3. dennis@dhlhomefurnishings.

    Problem with editprice.php

    My store is running Oscommerce 2.2 RCa2 and I am just about finished upgrading requirements to move from php 5.2 to 5.3 I seem to have a problem with my edit price file which is accessed from the admin area via Catalogue - Edit Product Price. When I select that I get the following error Parse error: syntax error, unexpected $end in C:\Documents and Settings\DHL\My Documents\xampp\htdocs\mywebsite.co.uk\admin\editprice.php on line 189 I have gone back to php 5.2 and the editprice.php works fine. I have checked all the normal changes for php 5.3 but it must be something different. Be very grateful if anyone can tell me what the problem is. Code for editprice.php <?php /* $Id: customers.php 1739 2007-12-20 00:52:16Z hpdl $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); function getTaxRate($tax_id) { return tep_get_tax_rate_value($tax_id); } function getGrossPrice($taxid,$NETprice) { $taxRate = getTaxRate($taxid); if ($taxRate > 0) { $grossPrice = $NETprice * (($taxRate / 100) + 1); } return round($grossPrice,4); } function getNetPrice($taxid,$grossPrice) { $taxRate = getTaxRate($taxid); if ($taxRate > 0) { $NETprice = $grossPrice / ((1+$taxRate / 100) ); } return round($NETprice,4); } $action=$_POST['action']; if ($action=="save") { $taxid=$_POST['tax']; $pid=$_POST['proid']; $price=getNetPrice($taxid,$_POST['price']+0); tep_db_query("update products set products_price='$price' where products_id=$pid"); header("location:editprice.php"); } $srhName=$_POST['srhName']; $srhPriFrom=$_POST['srhPriFrom']+0; $srhPriTo=$_POST['srhPriTo']+0; $srhMan=$_POST['srhMan']; $srhDes=$_POST['srhDes']; if ( $srhDes!="" || $srhMan!="" || $srhPriFrom>=0 || $srhPriTo>=0 || $srhName!="" ) {//ËÑË÷ $srh=true; $tmpsql=""; if ($srhName) $tmpsql=" and pd.products_name like '%$srhName%' "; if ($srhPriFrom>0) //$tmpsql.=" and p.products_price>=$srhPriFrom"; $tmpsql.=" and p.products_tax_class_id =tr.tax_class_id and p.products_price>=$srhPriFrom/(tr.tax_rate/100+1) "; if ($srhPriTo>0) //$tmpsql.=" and p.products_price<=$srhPriTo"; $tmpsql.=" and p.products_tax_class_id =tr.tax_class_id and p.products_price<=$srhPriTo/(tr.tax_rate/100+1) "; if ($srhMan) { $manquery=tep_db_query("select manufacturers_id,manufacturers_name from manufacturers where manufacturers_name='$srhMan'"); $manarr=tep_db_fetch_array($manquery); if($manid=$manarr["manufacturers_id"]) $tmpsql.=" and p.manufacturers_id='$manid'"; else $tmpsql.=" and p.manufacturers_id='0'"; } if ($srhDes) $tmpsql.=" and pd.products_description like '%$srhDes%' "; } $sqlstr="select DISTINCT p.products_tax_class_id, p.products_id, p.products_model, p.products_price, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, tax_rates tr where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' $tmpsql order by p.products_model"; $products_query = tep_db_query($sqlstr); ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <title><?php echo TITLE; ?></title> <link rel="stylesheet" type="text/css" href="includes/stylesheet.css"> <script language="javascript" src="includes/general.js"></script> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onLoad="SetFocus();"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="2" cellpadding="2"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top"> <?php echo tep_draw_form("search","editprice.php","","post"); echo tep_draw_hidden_field("action","search"); echo "<table class=smalltext><tr> </td><td> Name:</td><td>"; echo tep_draw_input_field("srhName"); echo " </td><td>Gross Price From:</td><td>"; echo tep_draw_input_field("srhPriFrom"); echo "</td><td> Keyword In Product Description:</td><td>"; echo tep_draw_input_field("srhDes"); echo "</td></tr><tr><td>Manufacturer:</td><td>"; echo tep_draw_input_field("srhMan"); echo " </td><td>Gross Price To:</td><td>"; echo tep_draw_input_field("srhPriTo"); echo "</td><td>".tep_draw_input_field("","search","",false,"submit")."</td></tr></table></form>"; ?> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"> <?php echo "Edit Product Gross Price."; ?> </td> </tr> </table> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="smallText" align="right"> <?php //$productpagequery= tep_db_query($sqlstr); //$numrows=tep_db_num_rows($productpagequery); //$attributes_split = new splitPageResults(1, 10, $sqlstr,$numrows); //$option_page = (isset($HTTP_GET_VARS['option_page']) && is_numeric($HTTP_GET_VARS['option_page'])) ? $HTTP_GET_VARS['option_page'] : 1; //$options = "select * from " . TABLE_PRODUCTS_OPTIONS . " where language_id = '" . (int)$languages_id . "' order by products_options_id"; //$options_split = new splitPageResults($option_page, MAX_ROW_LISTS_OPTIONS, $options, $options_query_numrows); //echo $attributes_split->display_links($numrows, MAX_ROW_LISTS_OPTIONS, MAX_DISPLAY_PAGE_LINKS, $attribute_page, 'option_page=' . $option_page . '&value_page=' . $value_page, 'attribute_page'); ?> </td> </tr> </table> <table width="100%" class="smalltext"> <tr> <td colspan="7"><?php echo tep_black_line(); ?></td> </tr> <tr class="dataTableHeadingRow"> <td width="10%" class="dataTableHeadingContent">Product ID</td> <td width="15%" class="dataTableHeadingContent">Product Model</td> <td width="45%" class="dataTableHeadingContent">Product Name</td> <td width="20%" class="dataTableHeadingContent">Gross Price</td> <td width="20%" class="dataTableHeadingContent">Save</td> </tr> <tr> <td colspan="7"><?php echo tep_black_line(); ?></td> </tr> <?php while ($proarr=tep_db_fetch_array($products_query)){ $color+=1; echo tep_draw_form("price"."$color","editprice.php","post"); ?> <tr class="<?php echo (floor($color/2) == ($color/2) ? 'attributes-even' : 'attributes-odd'); ?>"> <input type="hidden" value="<? echo $proarr['products_id']?>" name="proid"> <input type="hidden" name="action" value="save"> <input type="hidden" name="tax" value="<?php echo $proarr['products_tax_class_id']; ?>"> <td ><? echo $proarr['products_id']?></td> <td ><? echo $proarr['products_model']?></td> <td ><? echo $proarr['products_name']?></td> <td> £<input type="text" name="price" value="<? echo getGrossPrice($proarr['products_tax_class_id'],$proarr['products_price'])?>" /> </td> <td><input type="submit" value="save"></td> </tr> <? echo '</form>'; } ?> </table> </td> <!-- body_text_eof //--> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> Many thanks ... Dennis
  4. dennis@dhlhomefurnishings.

    Shipping Module PHP Issue

    Hello MrPhil Thank you so much for your reply - I have tested it and it works fine - Thanks Using the / for the delimiter in preg_split did cause an error as you suggested Regards ... Dennis
  5. dennis@dhlhomefurnishings.

    Shipping Module PHP Issue

    Hi Thanks for your quick response That fix would work fine for a uk postcode but we also ship to countries were thier post codes are a continious number like zip codes for example which might be 112304 - so if you strip 4 digits off that your left with 112. So the original code handles that because if there is no space it doesn't strip anything off the postcode. list($t_postcode, $local) = split('[/ -]', $postcode); Ant other ideas ? Thanks ... Dennis
  6. dennis@dhlhomefurnishings.

    Shipping Module PHP Issue

    Hi I am reaching the end of upgrading 2.2 RC2a from php 5.2 to 5.3 and have a problem sorting one of the "split" functions in a shipping module. The line of code is list($t_postcode, $local) = split('[/ -]', $postcode); Where the $t_postcode value might be TN12 8QT and the line of code is spliting the postcode so that it becomes TN12. I have tried changing it to list($t_postcode, $local) = explode('[/ -]', $postcode); and list($t_postcode, $local) = preg_split('/[/ -]/', $postcode); But neither of these examples splits the post code I would apprciate any help to fix this problem Thanks ... Dennis
  7. dennis@dhlhomefurnishings.

    [CONTRIBUTION] Ultimate SEO URLs v2.1 - by Chemo

    Many thanks FWR Media - I will give it a try and let you know Thanks again Dennis
  8. dennis@dhlhomefurnishings.

    [CONTRIBUTION] Ultimate SEO URLs v2.1 - by Chemo

    Having problems with redirects I deleted a product by mistake which google had indexed as http://www.mydoman.com/my-product-name-p-203.html I readded the product and the new url is http://www.mydomain.com/my-product-name-p-222.html I have tried various ways of trying a 301 redirect for the old product url to the new url in htaccess but I can't get anything to work Can anyone help with how to acheive the redirect with ultimate SEO installed please ? Thanks ... Dennis
  9. dennis@dhlhomefurnishings.

    Easy Populate & Products Attributes

    Hello Todd Thanks for your reply Yes I have modified EP 2.76g. I have added "product" fields for the "3 images" contribution and also "product descriptions" for the "Header Tag" contribution. This is what I changed the code to : [codebox]$custom_fields[TABLE_PRODUCTS] = array( 'products_mediumimage' => 'mediumimage' , 'products_largeimage' => 'largeimage'); // See above $custom_fields[TABLE_PRODUCTS_DESCRIPTION] = array( 'products_head_title_tag' => 'headertag' , 'products_head_desc_tag' => 'desc_tag' , 'products_head_keywords_tag' => 'keywordtag' , 'products_seo_url' => 'seo_url');[/codebox] Thanks ... Dennis
  10. dennis@dhlhomefurnishings.

    Easy Populate & Products Attributes

    Hello I have been using easypopulate on my localhost test web site for about 6 weeks now. I have been down loading the products and editing the csv file and then "inserting into database" without any problems. On Wed I wanted to start adding my new products so I changed the v_status column to "Delete" and sucessfully deleted all products except 2 which I want to keep. I then changed the v_status column to "Active" to test that I could add the products back - but I cannot add the products. I deleted all products apart from one from the file for testing purposes. This is the error I get when I try "Inserting into database" - I can see that the "products" are loading ok but the "product_descriptions" have duplicated columns and I have been trying to figure out why for 3 days now [codebox]File uploaded. Temporary filename: /tmp\php3F.tmpUser filename: EP2008Nov15-1503_1.csvSize: 1329| MSIMPRO | Microsoft | Descr | www | Title | descriptio | Keywords | http | microsoft/ | microsoft/ | microsoft/ | 49.99 | 10 | 0 | 01/01/1970 | 03/09/2008 | | Staunton C | subcategor | Wooden Des | | 1 | Chess Boar | 3 | No Board R | | 4 | Please Inc | | 2 | Case | 1 | No Case Re | | 2 | Please Inc | | --none-- | Active !New Product!1110 - Column 'products_head_keywords_tag' specified twiceINSERT INTO products_description ( products_id, language_id, products_name, products_description, products_head_title_tag,products_head_desc_tag,products_head_keywords_tag,produc ts_seo_url,products_head_title_tag,products_head_desc_tag,products_head_keywords_ tag, products_url ) VALUES ( '43', 1, 'Microsoft IntelliMouse Pro', 'Descr', 'Title','description','Keywords','http','Title','description','Keywords', 'www' )[TEP STOP][/codebox] I have tried saving in different formats as described in the manual but it makes no difference. [codebox]EP vers: 2.76g-MS2osCommerce Online Merchant v2.2 RC2aOS: HTTP: Apache/2.0.59 (Win32) DAV/2 PHP/5.2.3DB: MySQL 5.0.41-community-ntPHP: 5.2.3 (Zend: 2.2.0)Temp Directory:W:/www/chesssetstore.co.uk/temp/Temp Dir is WritableMagic Quotes is: offregister_globals is: onSplit files on: 300 recordsModel Num Size: 12Price with tax: falseCalc Precision: 2Replace quotes: falseField seperator: commaExcel safe output: truePreserve tab/cr/lf: falseCategory depth: 2Enable attributes: trueSEF Froogle URLS: falseMore Pics: falseUnknown Pics: falseHTC: falseSPPC: falseExtra Fields: false [/codebox] Hope someone can help point me in the right direction Thanks ... Dennis
  11. dennis@dhlhomefurnishings.

    Unable to import new products

    Please ignore, I was trying to post in easypopulate conribuition - Thanks
  12. dennis@dhlhomefurnishings.

    Unable to import new products

    Hello I have been using easypopulate on my localhost test web site for about 6 weeks now. I have been down loading the products and editing the csv file and then "inserting into database" without any problems. On Wed I wanted to start adding my new products so I changed the v_status column to "Delete" and sucessfully deleted all products except 2 which I want to keep. I then changed the v_status column to "Active" to test that I could add the products back - but I cannot add the products. I deleted all products apart from one from the file for testing purposes. This is the error I get when I try "Inserting into database" - I can see that the "products" are loading ok but the "product_descriptions" have duplicated columns and I have been trying to figure out why for 3 days now File uploaded. Temporary filename: /tmp\php3F.tmp User filename: EP2008Nov15-1503_1.csv Size: 1329 | MSIMPRO | Microsoft | Descr | www | Title | descriptio | Keywords | http | microsoft/ | microsoft/ | microsoft/ | 49.99 | 10 | 0 | 01/01/1970 | 03/09/2008 | | Staunton C | subcategor | Wooden Des | | 1 | Chess Boar | 3 | No Board R | | 4 | Please Inc | | 2 | Case | 1 | No Case Re | | 2 | Please Inc | | --none-- | Active !New Product! 1110 - Column 'products_head_keywords_tag' specified twice INSERT INTO products_description ( products_id, language_id, products_name, products_description, products_head_title_tag,products_head_desc_tag,products_head_keywords_tag,produc ts_seo_url,products_head_title_tag,products_head_desc_tag,products_head_keywords_ tag, products_url ) VALUES ( '43', 1, 'Microsoft IntelliMouse Pro', 'Descr', 'Title','description','Keywords','http','Title','description','Keywords', 'www' ) [TEP STOP] I have tried saving in different formats as described in the manual but it makes no difference. EP vers: 2.76g-MS2 osCommerce Online Merchant v2.2 RC2a OS: HTTP: Apache/2.0.59 (Win32) DAV/2 PHP/5.2.3 DB: MySQL 5.0.41-community-nt PHP: 5.2.3 (Zend: 2.2.0) Temp Directory: W:/www/chesssetstore.co.uk/temp/ Temp Dir is Writable Magic Quotes is: off register_globals is: on Split files on: 300 records Model Num Size: 12 Price with tax: false Calc Precision: 2 Replace quotes: false Field seperator: comma Excel safe output: true Preserve tab/cr/lf: false Category depth: 2 Enable attributes: true SEF Froogle URLS: false More Pics: false Unknown Pics: false HTC: false SPPC: false Extra Fields: false Hope someone can help point me in the right direction Thanks ... Dennis
  13. dennis@dhlhomefurnishings.

    Header Tags SEO

    Hello Jack Thank you for your patience. By pure luck I was able to get the title in the product page to appear correctly. In admin>>Header Tags SEO>>Page Controll>> "Default Tags - English, includes, the category, manufacturer and product options were selected. I unselected these and updated and everything looks ok. Has this happened because I have put code in the wrong place ? Could you clarify for me what the "root" option is for? Great contribution. Thanks ... Dennis
  14. dennis@dhlhomefurnishings.

    Header Tags SEO

    Hello Jack Sorry, I went through trying to explain what I see, but didn't actually say if anything was wrong. After ugrading to V3.0.9 I still get the same problem - the category is showing in the product title on the product page even though I dont have "category" selected in admin/header tags seo/page control product_info.php Yes, I did run "fill all Tags" which was sucessfull If I run the test function no errors are reported This is what I think I should be seeing as the product page title : Product Title Header Tags - Microsoft etc // "Product Title Header Tags" is from Meta Tag Information/Product Title Tag filled by me. This is what I actually see : Sub Category Header Tags - - Product Title Header Tags - Microsoft etc // "Sub Category Header Tags" filled by me in the subcategory title header tag If I put "1234" into the admin/header tags seo/page control/product_info.php Title box, then on the store product page I see the title : Sub Category Header Tags - 1234 - Product Title Header Tags - Microsoft etc Thanks ... Dennis
  15. dennis@dhlhomefurnishings.

    Header Tags SEO

    Hello Jack Just finished installing V3.0.9 Ran header_tags_seo_uninstall.php - replaced includes/header_tags.php - ran header_tags_seo_install.php Removed default text for product_info.php - product and root selected in "include" Added text in the category and product Header Tags Went to Store product page - this is what I see : Sub-Category Header Tag - - Product Title Tag - Microsoft etc Note the 2 dashes after Sub-Category Header Tag Breadcrumb shows all the right tags Can you tell me what the "View Results" does - when I select that for product_info.php the 3 boxes at the bottom turn red with no text in any of them Thanks ... Dennis
×