Jump to content

slupostrupek

Members
  • Content count

    32
  • Joined

  • Last visited

  1. So again, function in currencies.php: function calculate_price($products_price, $products_tax, $quantity = 1) { return tep_round(tep_add_tax($products_price, $products_tax), $this->currencies[$_SESSION['currency']]['decimal_places']) * $quantity; } Should be: function calculate_price($products_price, $products_tax, $quantity = 1) { return tep_round(tep_add_tax($products_price, $products_tax) * $quantity, $this->currencies[$_SESSION['currency']]['decimal_places']); } multiplication by quantity should be inside tep_round function.
  2. slupostrupek

    Content Modules - print anywhere

    Building design in content modules in metaphore is something like buildng house without fundations. If one of our content module got pole carrier, our php file which loads those content will blow away... :)
  3. slupostrupek

    Content Modules - print anywhere

    I will try to make it more clearier. Right now, files will lost they template information, becaus of content modules. Content modules are right now, lists. They are followed by sort order. So if we want to add something in our login.php <- we need to make correct CSS for our previous content and for the next content module. In my way of point of view. We will creating easier Theme by making it only in login.php or other specific php files defined in content modules, and there will be 'grounded' classes, where we will be adding into them right modules. So now it looks like that on example of product_info.php. - sort order 10 = Image box - sort order 20 = Name - sort order 30 = Buy Now - sort order 40 = Description whole design class need to be in those modules. Becaus it goes through that specific sort and also, if we would like to change sort, it also can destroy whole design if those div classes want be as like normal 'floats' or tables styles and all we know it, they want be like that!! Those modules will have to have special divs for template reasons.... and that is making unclear for changes. Instead of making sort order, there should be this modification allowing to make it like that: product_info.php instead of one while until list will go over it will have something like this: - div for image - div for right column where would goes name, button, model - div for description, comments, reviews and now, every developer nows, if want to change design he will edit those 3 divs in product_info, not in content modules and their sort order. and will do that: - div for image (echo getOneContent('enhancedColorBox') - div for right column( echo getOneContent('name') . 'div class model ' . getOneContent('model') . ' div class underAddToCart '. getOneContent('socialButtons')) and others... maybe it will have more echos, but still it will easier to manage template. Also we can provide more option for this, like adding params for getOneContent so not only title but also provde class name,
  4. slupostrupek

    Content Modules - print anywhere

    i can't edit. But as a second thought this 'everywhere' idea is a little bad, it's good if the Module will be displied on every page (footer / header). But still giving names in array are giving opportunity to place module not in one direction/place like a list, but it can be displayed on page where we want. Let's say, we want modul at the beggining of the page like index.php but the second modul at the end, and this will give us all power of getOneContent. So it should changed name 'everywhere' in to footerAndheader, so that people began to not use it in a bad way
  5. If we want to have content easy to modify on pages or page with option to turning off, we can use Content Module system for it and call only One of the box which we want and print it in our Template where we want. We can do through this steps: Create new directory: includes/modules/content/everywhere/ In template_top.php Before or just after: Add: if ($oscTemplate->hasContent('everywhere')) { $oscTemplate->getContent('everywhere'); } In osc_template.php Add (before getContent method) function getOneContent($title){ return $this->_content['everywhere'][$title]; } Modify: function addContent($content, $group, $contentname = false) { if($contentname){ $this->_content[$group][$contentname] = $content; }else{ $this->_content[$group][] = $content; } } And when you creating new module content in execute funtion do it like that: $oscTemplate->addContent($template, $this->group, $this->title); After all of this it's possible to print content where we want like that: echo $oscTemplate->getOneContent('Custom info');
  6. I have about 0,07 parse time better with this addon, so i don't understand why to not use it? I see only one thing is wrong in this plugin, there is missing cache deleting when there is new product in category and when product was edited, but it is not a big deal i think, it can be added not so hard i suppose. so right now when it is first time visiting page i have about from 0,19 to 0,26 after this plugin it is always below 0,2s to 0,14s
  7. Shit, sorry i paste wrong code :D I mean point 4: STEP 4 - Edit includes/application_top.php Add this to the bottom of includes/application_top.php just above the "?>" closing tag: ob_start(); require(DIR_WS_BOXES . 'shopping_cart.php'); $cart_cache = ob_get_clean(); # End the output buffer for cart and save as $cart_cache string Here is shopping_cart (now it's got name bm_shopping_cart). And how to get get it in to that $cart_cache
  8. Hello, I've install this addon: http://addons.oscommerce.com/info/2561 And it works, yet in 2.3 osc, there was changes in Boxes, new class for them etc. So whole site is getting cached and i don't know how to make not caching the bm_shopping_cart. In install guide of chemo it's Step 7 makes problem. " STEP 7 - Edit includes/column_right.php (or wherever you have the shopping cart displayed) Find this code: require(DIR_WS_BOXES . 'shopping_cart.php'); And REPLACE it with this code: if (!tep_session_is_registered('customer_id') && ENABLE_PAGE_CACHE == 'true' && class_exists('page_cache') ) { echo "<%CART_CACHE%>"; } else { require(DIR_WS_BOXES . 'shopping_cart.php'); } " How to solve that class problem. I would want to display here a shopping box, but i don't know how? How can i do this through class $osc_template ? is it possible? (i don't want whole column_right or left but only bm_shopping_cart)
  9. slupostrupek

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

    Problem with special characters is because of using SEO_DataBase class, function mysql_connect is not using correctly utf8 also this function is deprecated, more information wrote this user: http://pl1.php.net/manual/en/function.mysql-connect.php#108721 When i've done that, all of my urls was without text, someone else wrote that all data needs to be converted through utf8_encode(string) but that, i didn't tried. I will try to rewrite this to use oscommerce database functions or maybe someone already did it ?
  10. slupostrupek

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

    hmm maybe you can tell me what you get when you put: function strip($string){ if (CHARSET == 'utf-8') { $string = iconv("ISO-8859-1", "UTF-8", $string); <- this in my web, do nothing. } print_r($string); <---- This in that function (line 1843). If you will have question marks it would be known, the problem is in database? Am i correct?
  11. slupostrupek

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

    sorry i forgot to mention what is the problem exacly. Links to products and categories are missing converted characters. Special characters which should be converted is just disappearing.
  12. slupostrupek

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

    Hello, i have problem with special characters like others people here. But i've seen that there wasn't solution, so my problem is still active. Database is in utf8_general_ci I've changed encoding in index, application_top and seo.class to UTF-8 and still that didn't helped. When i've done this: print_r($this->attributes['SEO_CHAR_CONVERT_SET']); it's printinga couple of times. But first of them looks like this: Array ( [Ăł] => o [Ĺ] => l [Ĺ] => l [Ä] => c [Ĺş] => z [Ĺź] => z [Ä] => e [Ä] => a [Đż] => p [Đź] => m [Đ˝] => c [Ń] => h [в] => v [и] => y [Đš] => y [Đś] => zh [Ń] => t [Ń] => s [Ń] => yu [Ń] => sh [Đş] => k [Ń] => u ) where the next one looks like that: Array ( [ó] => o [ł] => l [Ł] => l [ć] => c [ź] => z [ż] => z [ę] => e [ą] => a [п] => p [м] => m [н] => c [ч] => h [в] => v [и] => y [й] => y [ж] => zh [т] => t [с] => s [ю] => yu [ш] => sh [к] => k [у] => u ) the second one is correct one, that what i save in configuration. And when i am printing $string it's print with question marks insteed of special characters. Can someone help me?
  13. slupostrupek

    Header Tags SEO

    That fix helped only with undefined 'db' and created undefined creator. About store_logo it's reletaed to this addon. It's this line: <div><div id="storeLogo"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'store_logo.png', (tep_not_null($header_tags_array['logo_text']) ? $header_tags_array['logo_text'] : STORE_NAME)) . '</a></div>'; All those notices i've got is because this add doesn't work on index.php.
  14. slupostrupek

    Header Tags SEO

    I've installed without problems but i've got does Notices on frontpage: Notice: Undefined index: manufacturers_id in /home/xx/public_html/xx/includes/header_tags.php on line 35 Notice: Undefined index: title in /home/xx/public_html/xx/includes/header_tags.php on line 218 Notice: Undefined index: desc in /home/xx/public_html/xx/includes/header_tags.php on line 219 Notice: Undefined index: keywords in /home/xx/public_html/xx/includes/header_tags.php on line 220 Notice: Use of undefined constant store_logo - assumed 'store_logo' in /home/xx/public_html/xx/includes/modules/header_tags_opengraph.php on line 22 Notice: Use of undefined constant png - assumed 'png' in /home/xx/public_html/xx/includes/modules/header_tags_opengraph.php on line 22 Notice: Undefined variable: db in /home/xx/public_html/xx/includes/modules/header_tags_opengraph.php on line 24 Notice: Undefined index: title in /home/xx/public_html/xx/includes/modules/header_tags_opengraph.php on line 26 Notice: Undefined index: desc in /home/xx/public_html/xx/includes/modules/header_tags_opengraph.php on line 27 Notice: Undefined index: logo_text in /home/xx/public_html/xx/includes/header.php on line 29 newest oscommerce and newest Header Tags SEO
×