nopCommerce change Quantity and StockQuantity to Double or Float - nopcommerce

I’m using nopCommerce2.5 and I have searched far and wide for someone who has updated the “add to cart quantity” and “StockQuantity” to a Decimal or Float.
I need a minimum of .25 in stock and then be able to increment by .25…
Has anyone done this?

Just jump in and change all references to Quantity throughout the entire solution and it all works fine.

Related

WooCommerce ignoring decimal price

I have a WooCommerce 7.0.0 shop for which I'm programmatically creating products.
The price of these products is calculated according to various user input values.
I've done it before on other sites without problem, but I'm currently facing an issue : when the calculated price is a float, on the review order table, the price is not displayed correctly, and I'm getting a notice : A non well formed numeric value encountered in class-wc-cart.php on line 2151
Eg. if the price is 5.24€, I get 5.00€ on the product detail, subtotal, and total of the cart.
However, the price is displayed correctly as 5.24€ in the back-office.
Also, it is stored correctly in database.
Here's 2 methods I've tried to save the price before getting to checkout :
// Method 1
$product->set_price($total);
$product->set_regular_price($total);
$product->save();
// Method 2
add_post_meta($pID, '_regular_price', $total);
add_post_meta($pID, '_price', $total);
I tried various casting and rounding methods before saving (flotval, number_format, sprintf('%.2F') ) to no avail.
I also tried both , and . separators on the WooCommerce settings.
I'm running out of ideas, I must have missed something obvious but as it is, I can't put my finger on it.
Maybe something has changed on the newer versions of WooCommerce ? The last version I've used where I created products in the same way without issue, was 6.3.1.
Any help is welcome :)
Thanks,

Facebook Pixel: mismatched content_id values - how to fix?

I would greatly appreciate some help with my current Facebook catalog ad predicament.
For a product with stock number 12345, our data feed brings it into the Facebook catalog as 616_12345 (the 616_ is consistent). This is the content_id.
To match the FB pixel content_id and track events, the stock number in the catalog needs to match the stock number on the site. So no events are being recorded.
I am managing the pixel and events through Google Tag Manager. I have set up a CSS selector that points to the stock number in an unordered list, but of course it just returns 12345.
Is there a way to create a variable in GTM that assumes a "616_" will be added before the stock number?
I've been told there is no way to remove that 616_ from the data feed - so this is the only option I can think of.
Thanks very much in advance!
Yes there is a way to create a variable in GTM - simple create "Constant" variable and set its' value to "616_". You can then reference this variable in your events and tags by simply using double curly brackets like so: {{VariableName}} . You can find detailed information here.

Woocommerce - Wrong rounded values in Cart

I have a problem with the round function (woocommerce) for the value in the cart.
Problem is that the value 8.4903€ is rounded to 8.50€. It should be 8.49€
Take a look a the captures:
In capture 1 I set the woocommerce to show 4 decimals in the prices so that we can see the real values.
In capture 2 I set the woocommerce to show 2 decimals. Here you will see that the rounded values are wrong.
How can I trace this issue? I already deactivate all plugins (except woocommerce, of course), so that I can be sure this issue is not caused by other plugin.
I already opened (week ago) an issue for this in the plugin author page, but nothing yet. So, I guess if we can sort this out with a function in the function.php file of my child theme.
I know how to use the php round() functions but I need help to target ALL woocommerce values in the cart.
---------------capture 1--
---------------capture 2--
---------------capture 3--
Fixed!. I just enabled 'Round tax at subtotal level, instead of rounding per line' and the issue is gone. Thank you #MujeebuRahman!
https://s.nimbusweb.me/share/2533555/4x99afoss5d7vtfny98w
Round tax at subtotal level, instead of rounding per line

Change Field Type from Int to Float

I'm helping a co-worker with a Drupal (6) issue, but I've never used Drupal before. The client wants to store decimal values in a field that was originally defined as an integer. I can't believe that this isn't possible without losing content or without doing a bunch of SQL copying, but I can't find anything that says, "sure, you can update the field type pretty easily, just do...".
Is this possible? So far:
We've altered the the content_type_thing table so that the _value field is now a float data type rather than an int.
We've updated the content_node_field table so the type value for that field is number_float
Now we can change the value from 1840 to 1840.25 without getting a validation error, but the .25 never gets saved. It gets chopped off and we get 18.00 in the database.
Any ideas?
Thanks.
UPDATE
Before anyone asks, I have read this post, but it looks like the recommendation involves a bunch of data migration. I just can't believe that there's not a way to change the data type in place.
This is pretty straight forward my friend. download this module
http://drupal.org/project/formatted_number
When you install it, go to the content type and change that field to use float.
Actually there is a solution but it's not easy and if you don't know exactly what
you're doing it may have side effects
https://drupal.stackexchange.com/questions/79378/changing-a-field-type-from-integer-to-decimal

How to enable Add Total option in Tablix

I had a problem of couting sum of grouped rows in a tablix. I posted it on stackoverflow. There I found the detailed answer by a user. But the problem is now, he is asking me to add "Add Total" in one cell of my tablix. Whereas I find no option of adding Add Total on every cell. In fact it is disabled on each cell except the cell that is coming under a group.
The person is using Italian IDE (Visual Studio) whereas my IDE is in english. Is there any difference between these two?
Please see the detailed post and reply if there is any solution.
I'll be thankful.
SSRS Sum in table group
I had the same problem. I think the problem is if the field is not recognised as a numeric, then 'Add Total' field will be disabled. So to overcome this problem, first I inserted a row at the bottom of the table and then I converted the field into double in the expression as follows
=SUM(cdbl(Fields!GROSS_MARGIN.Value))
After running the report, I was able to see expected total.
I found the answer
here
This is an alternate solution to my problem.
Make column properties for which u want totals as double or decimal in dataset.
Refresh report data in report designer. U will be able to see add total as enabled. Right click on column for which u want to add total and select Add Total.
no there is no differnce between it

Resources