Jump to content

sparkin

Members
  • Content count

    13
  • Joined

  • Last visited

1 Follower

Profile Information

  • Real Name
    Scott
  1. sparkin

    Header Tags SEO

    I'd like to make sure the installation is correct. The feature is now working as expected and the tags are all appearing ok. Which part of the install have I got wrong? Thanks, Scott
  2. sparkin

    Header Tags SEO

    In the same function the product sort is being set as "1" when the option is not selected. This throws an error when you first try and save the new details. Change this: for ($i=0; $i < count($languages); ++$i) { $sql_data_array = array('page_name' => $psedudoPage, 'page_title' => '', 'page_description' => '', 'page_keywords' => '', 'page_logo' => '', 'append_default_title' => 0, 'append_default_description' => 0, 'append_default_keywords' => 0, 'append_default_logo' => 0, 'append_category' => 0, 'append_manufacturer' => 0, 'append_product' => 0, 'append_root' => 1, 'sortorder_title' => 0, 'sortorder_description' => 0, 'sortorder_keywords' => 0, 'sortorder_logo' => 0, 'sortorder_category' => 0, 'sortorder_manufacturer' => 0, 'sortorder_product' => 1, 'sortorder_root' => 1, 'language_id' => $languages[$i]['id']); tep_db_perform(TABLE_HEADERTAGS, $sql_data_array); } $newfiles = GetFileList($languages_id); to this (note product sort): for ($i=0; $i < count($languages); ++$i) { $sql_data_array = array('page_name' => $psedudoPage, 'page_title' => '', 'page_description' => '', 'page_keywords' => '', 'page_logo' => '', 'append_default_title' => 0, 'append_default_description' => 0, 'append_default_keywords' => 0, 'append_default_logo' => 0, 'append_category' => 0, 'append_manufacturer' => 0, 'append_product' => 0, 'append_root' => 1, 'sortorder_title' => 0, 'sortorder_description' => 0, 'sortorder_keywords' => 0, 'sortorder_logo' => 0, 'sortorder_category' => 0, 'sortorder_manufacturer' => 0, 'sortorder_product' => 0, 'sortorder_root' => 1, 'language_id' => $languages[$i]['id']); tep_db_perform(TABLE_HEADERTAGS, $sql_data_array); } $newfiles = GetFileList($languages_id);
  3. sparkin

    Header Tags SEO

    I think the error is in here: /********************** ADD A PSEUDO PAGE ***********************/ else if (isset($_POST['add_pseudo_page_x'])) { $psedudoPage = tep_db_prepare_input($_POST['pseudo_page_name']); if (strpos($psedudoPage, ".php") === FALSE || strpos($psedudoPage, "?") === FALSE || strpos($psedudoPage, "=") === FALSE) { $messageStack->add(sprintf(ERROR_INVALID_PSEUDO_FORMAT, $psedudoPage), 'error'); } else { $parts = explode("?", $psedudoPage); if (($result = FileNotUsingHeaderTags($parts[0])) === 'FALSE') { $pageTags_query = tep_db_query("select * from " . TABLE_HEADERTAGS . " where page_name like '" . $psedudoPage . "' and language_id = '" . (int)$languages_id . "'"); $pageTags = tep_db_fetch_array($pageTags_query); if (tep_db_num_rows($pageTags_query) == 0) { where $result = FileNotUsingHeaderTags($parts[0]) is evaluating to TRUE I changed the code to this: /********************** ADD A PSEUDO PAGE ***********************/ else if (isset($_POST['add_pseudo_page_x'])) { $psedudoPage = tep_db_prepare_input($_POST['pseudo_page_name']); if (strpos($psedudoPage, ".php") === FALSE || strpos($psedudoPage, "?") === FALSE || strpos($psedudoPage, "=") === FALSE) { $messageStack->add(sprintf(ERROR_INVALID_PSEUDO_FORMAT, $psedudoPage), 'error'); } else { $parts = explode("?", $psedudoPage); if (($result = FileNotUsingHeaderTags($parts[0])) === 'TRUE') { $pageTags_query = tep_db_query("select * from " . TABLE_HEADERTAGS . " where page_name like '" . $psedudoPage . "' and language_id = '" . (int)$languages_id . "'"); $pageTags = tep_db_fetch_array($pageTags_query); if (tep_db_num_rows($pageTags_query) == 0) { and now it seems to be working. Is this change correct??? Thanks, Scott
  4. sparkin

    Header Tags SEO

    I just tried it again making sure I pressed the update button, but the same result, no error and no entry saved for that page. Using the latest STS and I've added the header_tags reference in Admin for STS (all the other pages are working fine with HT SEO). Thanks, Scott
  5. sparkin

    Header Tags SEO

    You asked if information.php shows up in the drop-down list, yes it does. You asked if the tags show up on the shop side, yes they do, the same tags for every information page I've created. If I try and create a unique information page using the Pseudo function it doesn't throw an error but the unique page does not appear inthe drop-down list. Thanks, Scott
  6. sparkin

    Header Tags SEO

    Yes they do Jack, for each information page I have (ie. the same tags). My understanding of the Pseudo Page feature was that I could set unique tags for each of the information pages. Is that correct? Thanks, Scott
  7. sparkin

    Header Tags SEO

    Hi Jack, I have HT SEO V3.0.6 installed together with Information Pages Unlimited. HT SEO and IPU both work really well. I tried to use your Pseudo Page feature by entering: information.php?info_id=10 into the field (after choosing Add Missing Pages as required within the Pseudo Pages box). I'm not getting any response from the feature. There are no DB entries for the page and it doesn't appear in the drop-down list of pages. Do I need to perform any other actions to make this work other than entering the part-URL as above?? Thanks for a great contribution and your ongoing support. Scott
  8. Bogdan, FYI I get the same error as wintecs when i try and export using IE, but the export is fine with Firefox. I can't work out what the problem is but i doubt it is a server issue. If you can figure out what part of the code may not be cross-browser compatible it would be great for my colleagues. Regards, Scott
  9. sparkin

    Margin Report v2.10

    To fix the Daily report returning no orders: In margin_report2.php look for $d = mysql_fetch_array($date, MYSQL_ASSOC); in the 'daily' secion of the switch around line 41. Add after this: $d2 = 'now()'; HTH, Scott
  10. Hi John, Appreciate the contribution bit but I've no experience there and i don't want to muck anyone else's installations up by omitting or adding code automatically through a full contribution. I may be too cautious but I feel better about it ;) Hi Rav, I have absolutely no experience with the Attribute Sets contribution so I won't be much help. Perhaps if you also let us know the error you are receiving someone else with more knowledge may be able to help. As a tip, I imagine that the admin for Attribute Sets already places changes back into the DB. Have a look at that code (as I did for Extra Product Fields) and see if you can find an answer there. Cheers, Scott
  11. I've seen a number of people requesting help to integrate the Product Extra Fields contribution with Easy Populate. I have not tested the following code extensively but it does seem to work. PLEASE NOTE: You can only add new fields from within admin. You must then download an Easy Populate file to update the extra fields for each product. If you delete an extra field in admin after downloading an Easy Populate file and then import an Easy Populate file with the deleted field it will be ignored. I am no super programmer and I'm sure my code can be optimised considerably but I'd lilke to put back into the community a small portion of the assistance I've received. Much of the basis of the code stems from the original Product Extra Fields contribution. STEP 1: Find the following on approx. line 423 // If you have other modules that need to be available, put them here Add the following immediately below this line: // START: Extra Fields Contribution v2.0a $extra_fields_query = tep_db_query(" SELECT 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=".$row['v_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)) { $row['v_PEF_'.$extra_fields['name']] = $extra_fields['value']; } // END: Extra Fields Contribution STEP 2: Find the following on approx. line 1047 // build the categories name section of the array based on the number of categores the user wants to have for($i=1;$i<$max_categories+1;$i++){ $filelayout = array_merge($filelayout, array('v_categories_name_' . $i => $iii++)); } Add the following immediately below: //START: Extra Fields Contribution v2.0a $extra_fields_query = tep_db_query(" SELECT pef.products_extra_fields_name as name FROM ". TABLE_PRODUCTS_EXTRA_FIELDS ." pef ORDER BY products_extra_fields_order"); while ($extra_fields = tep_db_fetch_array($extra_fields_query)) { $filelayout = array_merge($filelayout, array('v_PEF_'.$extra_fields['name'] => $iii++)); } // END: Extra Fields Contribution v2.0a STEP 3: Find the following on approx. line 2072 // VJ product attribs end Add the following code after this line and before the "} else {" // START: Extra Fields Contribution // Get current list of extra fields $extra_fields_query = tep_db_query(" SELECT pef.products_extra_fields_name as name FROM ". TABLE_PRODUCTS_EXTRA_FIELDS ." pef ORDER BY products_extra_fields_order"); while ($extra_fields = tep_db_fetch_array($extra_fields_query)) { $v_current_PEF_name = $extra_fields['name']; $v_current_PEF_value = $items[$filelayout['v_PEF_' . $v_current_PEF_name]]; //if row value is not null update, else delete the current entry if value is now null if(isset($filelayout['v_PEF_' . $v_current_PEF_name])) { // Check to see if this entry has not been added since download //Find key value for this extra field $extra_fields_id_query = tep_db_query("SELECT pef.products_extra_fields_id as PEFid, pef.products_extra_fields_name FROM ". TABLE_PRODUCTS_EXTRA_FIELDS ." pef WHERE pef.products_extra_fields_name = '".$v_current_PEF_name."'"); $result = tep_db_fetch_array($extra_fields_id_query); $PEF_id = $result['PEFid']; //Check if we are inserting, updating or deleting $extra_fields_exist_query = tep_db_query("SELECT * FROM " . TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS . " WHERE products_id = " . $v_products_id. " AND products_extra_fields_id = ".$PEF_id); while ($products_extra_fields_exist = tep_db_fetch_array($extra_fields_exist_query)) { $extra_product_value_exist = True; //found an entry } if ($extra_product_value_exist) { // an entry exists if ($v_current_PEF_value == '') tep_db_query("DELETE FROM " . TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS . " where products_id = " . $v_products_id . " AND products_extra_fields_id = " . $PEF_id); else tep_db_query("UPDATE " . TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS . " SET products_extra_fields_value = '" . tep_db_input($v_current_PEF_value) . "' WHERE products_id = " . $v_products_id . " AND products_extra_fields_id = " . $PEF_id); }else { // an entry does not exist if ($v_current_PEF_value != '') tep_db_query("INSERT INTO " . TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS . " (products_id, products_extra_fields_id, products_extra_fields_value) VALUES ('" . $v_products_id . "', '" . $PEF_id . "', '" . tep_db_input($v_current_PEF_value) . "')"); } } } // END: Extra Fields Contribution Hope this helps somebody else. I love the Product Extra Fields contribution and this extra code makes the whole extra field issue completely dynamic. Cheers, Scott
×