Search found 60 matches

Search found 60 matches

Re: HOW TO: Add CSS class to BODY tag (must have for themers

Could you please tell me how you'd go about doing this, only with just one class added Well, the goal was to make this universal and appliable in variety of situations. Why would you bother removing the rest of the classes as long as you have the one you need added correctly everywhere? And, eventu...

Jump to post
  • Thu Mar 29, 2012 2:35 am
  • Replies 7
  • Views 10179
Re: "Conditional" options

I know that one solution is to make all possible product combinations as separate options, but I was just wondering did you do anything on that part in the logic. I guess when you said options still work as normal answered my question, but I dind't pay close atention. Even still, module is worthy ad...

Jump to post
  • Sun Mar 04, 2012 10:44 am
  • Replies 77
  • Views 16955
Re: "Conditional" options

It doesn't matter that their shop has 70 small shirts and 40 red shirts. It matters that they have 17 small red shirts. Exactly what I am asking, but you still didn't answer my question, so I think. In a normal cart, if I have 1 red shirt (large) and 1 blue shirt (small), in options for color red a...

Jump to post
  • Fri Mar 02, 2012 8:16 pm
  • Replies 77
  • Views 16955
Re: "Conditional" options

This won't change the way options work but you can put quantity/pricing on the last child option value (assuming the option value is unique). So, this means it won't be possible to track product quantities per dependent options combo choice? Not directly, no. You can do this round-aboutly if you ma...

Jump to post
  • Fri Mar 02, 2012 7:06 am
  • Replies 77
  • Views 16955
Re: "Conditional" options

This won't change the way options work but you can put quantity/pricing on the last child option value (assuming the option value is unique). So, this means it won't be possible to track product quantities per dependent options combo choice? Example: A shirt has size and color options. There are 19...

Jump to post
  • Mon Feb 27, 2012 12:56 pm
  • Replies 77
  • Views 16955
Re: Paypal and OC total amount diffrence problem

And here is a quick example of what I am gibbering about <?php $price = 13.1154; $number_of_items = 23; $total_1 = round($price * $number_of_items, 4); $total_2 = round($price, 2) * $number_of_items; $diff = round($total_1 - $total_2, 2); echo "Item price: <b>" . $price . "</b> (this will be display...

Jump to post
  • Thu Feb 23, 2012 8:52 am
  • Replies 72
  • Views 43234
Re: Paypal and OC total amount diffrence problem

Ok, I think I figured the biatch. This is my testing scenario Product price is 13.984. Currency is set to be displayed with 3 decimal digits. Product price shows as 13.984, I add 3 products and have 13.984 * 3 = 41.952 in product row Sub-total 41.952 Total 41.952 With original code, I get PP errors ...

Jump to post
  • Thu Feb 23, 2012 7:18 am
  • Replies 72
  • Views 43234
Re: Paypal and OC total amount diffrence problem

Mind my last post, I usually talk gibbersih this late without my daily dosage of beer.
Let me try to rethink this now with a can of beer on my side :)

This is the debug when setting USD currency to 3 decimal places

SHIPPINGAMT=0.000
TAXAMT=0.000
ITEMAMT=41.95
AMT=41.952

Jump to post
  • Thu Feb 23, 2012 6:53 am
  • Replies 72
  • Views 43234
Re: Paypal and OC total amount diffrence problem

This bug is in OC itself. Set test product with price 13.9840. OC rounds it's price to 13.98 when displaying. When calculating price for, say 3 products, it uses price with 4 digits, not the rounded price, so 13.9840 * 3 = 41.9520 which is then rounded to 41.95. However, it clearly does not make sen...

Jump to post
  • Thu Feb 23, 2012 5:59 am
  • Replies 72
  • Views 43234
Re: Paypal and OC total amount diffrence problem

I am only poitning the math behind this, difference can never be more then +/-1, and that is correct. I mentioned PHP_ROUND_HALF_UP because that is not the standard way to round floats in math, other rules are used in everyday math, but as you say, that is not the source of the problem. Shop I'm wor...

Jump to post
  • Thu Feb 23, 2012 4:00 am
  • Replies 72
  • Views 43234
Re: Paypal and OC total amount diffrence problem

Q, since you are using round() with no 3rd param, it defaults to PHP_ROUND_HALF_UP, meaning 1.000 1.001 1.002 1.003 1.004 rounds down to 1.00 1.005 1.006 1.007 1.008 1.009 rounds up to 1.01 Because of this, difference can never be more then 1 (either + or -). public function format already does roun...

Jump to post
  • Thu Feb 23, 2012 1:14 am
  • Replies 72
  • Views 43234
Re: Paypal and OC total amount diffrence problem

Maybe Q wasn't clear enough when he explained "pre-conversion" here http://forum.opencart.com/viewtopic.php?f=124&t=44870&p=254438#p254430 What he actually meant is "pre-rounding" math. OpenCart uses more decimal places when calculating percentage, and then rounds to 2 decimal places (or whatever is...

Jump to post
  • Thu Feb 23, 2012 12:33 am
  • Replies 72
  • Views 43234
Re: Overflow on banners

After the banner there is this JavaScript code <script type="text/javascript"><!-- var banner = function() { $('#banner0').cycle({ before: function(current, next) { $(next).parent().height($(next).outerHeight()); } }); } setTimeout(banner, 2000); //--></script> It doesn't have any stops defined, jus...

Jump to post
  • Mon Feb 20, 2012 8:08 am
  • Replies 10
  • Views 804
Re: OpenCart 1.6.0 Roadmap

A description field for options in admin area would be nice, primarily to be able to distinguish between many likely named option groups. We have several product categories, and all have different values for Size. It is becoming hard to distinguish which of many "Size" options refer to which product...

Jump to post
  • Mon Feb 20, 2012 5:39 am
  • Replies 538
  • Views 238194
HOW TO: Add CSS class to BODY tag (must have for themers)

Every serious themer will sooner or later want to apply different style to the same element rendered accross various pages. Default OpenCart theme doesn't provide means to do this because header.tpl outputs <body> tag wihout any classes, making the previous task impossible to accomplish. But, cry no...

Jump to post
  • Mon Feb 20, 2012 3:50 am
  • Replies 7
  • Views 10179
Re: Overflow on banners

As JAY suggested, paste all those 3 lines.

Adding just overflow: hidden, as I initially suggested, doesn't work because height has not yet been set (position and height are added on page load)

Jump to post
  • Mon Feb 20, 2012 3:24 am
  • Replies 10
  • Views 804
Re: Understanding GNL Public License with Opencart

Yes, but distribution (or propagation) without permission is an infringement of copyright law. Not with GPL. GPL is a license, not a contract. Quite contrary, as the matter of fact - it is enforcing distribution without requiring any permissions, except providing the license :) We also can not make...

Jump to post
  • Sat Feb 18, 2012 1:37 pm
  • Replies 38
  • Views 13857
Re: Understanding GNL Public License with Opencart

Yes, but the Terms & Conditions, define "conveying" as a form of propagation. Propagation is defined as including distribution and, according to the Terms & Conditions, propagation requires permission. Terms & Conditions are the whole document (preamble, point 0., point 1., ...) Point 0. Definition...

Jump to post
  • Sat Feb 18, 2012 10:21 am
  • Replies 38
  • Views 13857
Re: Different page background color for HOME page & other pa

CSS code should be something like

Code: Select all

body {
...
existing styles
...
}
body.home-page {
...
your-styles-here
...
}
As you see, this should come after existing styles for body, or it will get overwritten.

Jump to post
  • Fri Feb 17, 2012 10:11 am
  • Replies 8
  • Views 3164

Search found 60 matches