Jump to content

itsjust

Members
  • Content count

    51
  • Joined

  • Last visited

About itsjust

  • Birthday 03/25/1978

Profile Information

  1. One change you might want or already have - it was a previous fix to striplash problem that i found out that I had in the above fix change pages_html_text' => $_POST[$pages_html_textm] with pages_html_text' => stripslashes($_POST[$pages_html_textm]) -------------------- Moske Nogavice
  2. :)Solution to "Error: Page title required." problem I hope the fight is over now First change if (empty($$title_field_name)) { $messageStack->add(ERROR_PAGE_TITLE_REQUIRED, 'error'); to if (empty($_POST[$title_field_name])) { $messageStack->add(ERROR_PAGE_TITLE_REQUIRED, 'error'); Then change $sql_data_array_pages = array('sort_order' => $sort_order, 'status' => '1', 'page_type' => $page_type); $sql_data_array_pages_description = array('pages_title' => $$pages_titlem, 'pages_html_text' => $$pages_html_textm, 'intorext' => $$intorextm, 'externallink' => $$externallinkm, 'link_target' => $$link_targetm); to $sql_data_array_pages = array('sort_order' => $_POST[sort_order], 'status' => '1', 'page_type' => $_POST[page_type]); $sql_data_array_pages_description = array('pages_title' => $_POST[$pages_titlem], 'pages_html_text' => $_POST[$pages_html_textm], 'intorext' => $_POST[$intorextm], 'externallink' => $_POST[$externallinkm], 'link_target' => $_POST[$link_targetm]); The trick was to get the $_POST tag in there where it was needed -------------------- Moske Nogavice http://www.momara.si
  3. Looking for some help to solve this problem in Extra pages-info box w/ admin When creating a new page or updating an old in the admin, this Error appears: Error: Page title required. This is a new error. It worked before, and I have made no changes. It also works fine on my localhost version, on my own pc. I can get the error to disapear and report "Success: The page has been updated." by changing (in admin/page_manager.php) if (empty($$title_field_name)) { $messageStack->add(ERROR_PAGE_TITLE_REQUIRED, 'error'); to if (empty($_POST[$title_field_name])) { $messageStack->add(ERROR_PAGE_TITLE_REQUIRED, 'error'); But that just reveals that the problem is bigger, because the only thing saved in the new page is the sort order number. The title or the text is not saved. I imagine that the problem is to be found somewere here $title_field_name='pages_title_'.$languages[$i]['id']; if (empty($$title_field_name)) { $messageStack->add(ERROR_PAGE_TITLE_REQUIRED, 'error'); $page_error = true; } } if (empty($pages_html_text)) { } if ($page_error == false) { if ($action == 'insert') { if($page_type == "1" || $page_type == "2") { $selectquery=tep_db_query("select count(*) as count from ". TABLE_PAGES ." where page_type=\"$page_type\""); $exists = tep_db_fetch_array($selectquery); if($exists['count'] >= 1) { $updateall=tep_db_query("update ". TABLE_PAGES ." set page_type=\"3\" where page_type=\"$page_type\""); } } } if ($action == 'update') { if($page_type == "1" || $page_type == "2") { $selectquery=tep_db_query("select count(*) as count from ". TABLE_PAGES ." where page_type=\"$page_type\" and pages_id != \"(int)$pages_id\""); $exists = tep_db_fetch_array($selectquery); if($exists['count'] >= 1) { $updateall=tep_db_query("update ". TABLE_PAGES ." set page_type=\"3\" where page_type=\"$page_type\""); } } } for ($i=0, $n=sizeof($languages); $i<$n; $i++) { $pages_titlem='pages_title_'.$languages[$i]['id']; $pages_html_textm='pages_html_text_'.$languages[$i]['id']; $intorextm='intorext_'.$languages[$i]['id']; $externallinkm='externallink_'.$languages[$i]['id']; $link_targetm='link_target_'.$languages[$i]['id']; $language_idm='language_id_'.$languages[$i]['id']; $sql_data_array_pages = array('sort_order' => $sort_order, 'status' => '1', 'page_type' => $page_type); $sql_data_array_pages_description = array('pages_title' => $$pages_titlem, 'pages_html_text' => $$pages_html_textm, 'intorext' => $$intorextm, 'externallink' => $$externallinkm, 'link_target' => $$link_targetm); if ($action == 'insert') { $bID=""; if ($i == 0) { tep_db_perform(TABLE_PAGES, $sql_data_array_pages); $pages_id = tep_db_insert_id(); } $pageid_merge= array('pages_id' => $pages_id, 'language_id' => $languages[$i]['id']); $sql_data_array_pages_desc = array_merge($sql_data_array_pages_description, $pageid_merge); tep_db_perform(TABLE_PAGES_DESCRIPTION, $sql_data_array_pages_desc); $messageStack->add_session(SUCCESS_PAGE_INSERTED, 'success'); } elseif ($action == 'update') { if ($i == 0) { tep_db_perform(TABLE_PAGES, $sql_data_array_pages, 'update', "pages_id = '" . (int)$pages_id . "'"); } $selectexists=tep_db_query("select count( * ) as `countrecords` from `".TABLE_PAGES_DESCRIPTION."` where pages_id='" . (int)$pages_id . "' and language_id='".$languages[$i]['id']."'"); $recordexists = tep_db_fetch_array($selectexists); if($recordexists['countrecords'] >= 1 ) { tep_db_perform(TABLE_PAGES_DESCRIPTION, $sql_data_array_pages_description, 'update', "pages_id = '" . (int)$pages_id . "' and language_id='".$languages[$i]['id']."'"); } else { $pageid_merge= array('pages_id' => $pages_id, 'language_id' => $languages[$i]['id']); $sql_data_array_pages_desc = array_merge($sql_data_array_pages_description, $pageid_merge); tep_db_perform(TABLE_PAGES_DESCRIPTION, $sql_data_array_pages_desc); } $messageStack->add_session(SUCCESS_PAGE_UPDATED, 'success'); } } hoping for some help Chris
  4. itsjust

    New Google Sitemap Generator

    I would suggest everyone to run the .php files in there own browser to see if the links are right. I am running a rc 1 store, and the cPath's are totally wrong
  5. itsjust

    Easy Discount

    I don't really know but maybe try this if you have not already Change to //first order if($first_time_customer=true) { $easy_discount->set('CQTY','5,00 Euro Eröffnungrabatt',5); } else { $easy_discount->remove_type('CQTY'); }
  6. itsjust

    Easy Discount

    Ups... I made a mistake. This is what to do instead: The problem is that the discount is not reset In checkout_process.php and in logoff.php after: $cart->reset(true); or: $cart->reset(); add: $easy_discount->reset();
  7. itsjust

    Easy Discount

    The problem is that the discount session is not unregistered In checkout_process.php after: $cart->reset(true); add: $easy_discount->reset(); And in logoff.php add: tep_session_unregister('CQTY'); Hope that helped
  8. itsjust

    Easy Discount

    SOLUTION to those who want to use the normal free shipping together with easy discount, but has run into the problem that free shipping does not take the discount into account. in freeamount.php Change // class methods function quote($method = '') { global $order, $cart, $shipping_weight; $dest_country = $order->delivery['country']['id']; $currency = $order->info['currency']; $get_total = false; $get_weight = false; $cart_total = $cart->show_total(); if (MODULE_SHIPPING_FREEAMOUNT_HIDE_SPECIALS == 'True') { // 28-9-2005 Check for articles on special which should not get free shipment // Adjust the cart total price for this $total_specials = 0; if ($cart->count_contents() > 0) { $products = $cart->get_products(); for ($i=0, $n=sizeof($products); $i<$n; $i++) { if ($special_price = tep_get_products_special_price($products[$i]['id'])) { $products_price = $special_price; $total_specials += $products_price; } } } $cart_total = $cart_total - $total_specials; } if ($cart_total < MODULE_SHIPPING_FREEAMOUNT_AMOUNT) to // class methods function quote($method = '') { global $order, $cart, $shipping_weight, $easy_discount; $dest_country = $order->delivery['country']['id']; $currency = $order->info['currency']; $get_total = false; $get_weight = false; $cart_total = $cart->show_total(); $easy_discount_total = $easy_discount->total(); if (MODULE_SHIPPING_FREEAMOUNT_HIDE_SPECIALS == 'True') { // 28-9-2005 Check for articles on special which should not get free shipment // Adjust the cart total price for this $total_specials = 0; if ($cart->count_contents() > 0) { $products = $cart->get_products(); for ($i=0, $n=sizeof($products); $i<$n; $i++) { if ($special_price = tep_get_products_special_price($products[$i]['id'])) { $products_price = $special_price; $total_specials += $products_price; } } } $cart_total = $cart_total - $total_specials; } if ($cart_total < (MODULE_SHIPPING_FREEAMOUNT_AMOUNT + $easy_discount_total))
  9. itsjust

    Change the starting order number

    find it here http://www.oscommerce.info/kb/31
  10. Here are some different versions of discounts. I have picked some examples from some of the other support threads Most of these you can put at the bottom of catelog/includes/application_top.php //10% discount on all orders if ($cart->count_contents() > 0) { // cart contents $easy_discount->add('OST','10% discount of Sub Total',$cart->show_total()*0.1); // 10% of cart total } else{ $easy_discount->remove_type('OST'); // remove discount if present and cart gets empty } //10% discount on all orders OVER 50 (LOCAL CURRENCY) if ($cart->show_total() > 50) { $easy_discount->add('OQ','Order Amount Discount 10% for orders over '.$currencies->format(50),$cart->show_total()*0.1); }else{ $easy_discount->remove_type('OQ'); // remove discount if present and cart gets empty } //A discount of 5(LOCAL CURRENCY) if 6 or more products in shopping cart if ($cart->count_contents() > 5) { $easy_discount->add('CART','Order Quantity Discount',50); } else { $easy_discount->remove('CART'); } // give 200 discount if ordered in german language if ($language == 'german') { $easy_discount->add('LNG','German Language Discount',200); } else { // take it away $easy_discount->remove('LNG'); } // give 100 discount if ordered in USD if ($currency == 'USD') { $easy_discount->add('CUR','USD Currency Discount',100); } else { // take it away $easy_discount->remove('CUR'); } Put the following on the page you want them to get a discount to view: // give 50 discount if they view this page $easy_discount->add('VW1','Viewing this page Discount',50); Put in checkout_shipping.php or checkout_payment.php // give 150 discount for local delivery if ($order->delivery['country_id'] == STORE_COUNTRY) { $easy_discount->add('LD','Local Delivery Discount',150); } else { // take it away $easy_discount->remove('LD'); }
  11. itsjust

    [Contribution] Show Sub-categories

    Try something like this order by sort_order, cd.categories_name LIMIT 5
  12. The solution to this is using the following if statement if ($fooa[$counter]['level'] == 1) { } Like this Change // display category name $subcategories_string .= $fooa[$counter]['name']; $subcategories_string .= '</a> '; if ($fooa[$counter]['next_id']) { $subcategories_string .= '| '; show_subcategories($fooa[$counter]['next_id']); }else{ $subcategories_string .= ' '; } } to // display category name if ($fooa[$counter]['level'] == 1) { $subcategories_string .= $fooa[$counter]['name']; } $subcategories_string .= '</a> '; if ($fooa[$counter]['next_id']) { if ($fooa[$counter]['level'] == 1) { $subcategories_string .= '| '; } show_subcategories($fooa[$counter]['next_id']); }else{ $subcategories_string .= ' '; } } Change the == 1 to what ever you need. == 2 would means only show sub level 2. <=2 would mean show sublevel 1 and 2. Play with it
  13. Well it works fine for me
  14. Just took this a step further so you can use the css styles on it What i did was to change the $subcategories_string .= '" class="subNavigation">'; to if ( ($id) && (in_array($counter, $id)) ) { $subcategories_string .= '" class="subNavigation2">'; }else{ $subcategories_string .= '" class="subNavigation">'; } And then of course make the nesasary css class in the stylesheet: A.subNavigation2 { color: #FF0000; } A.subNavigation2:hover { color: #DD0000; text-decoration:none; }
  15. Magic! Thanks a million for that!
×