Robin Somes Posted September 10, 2015 Share Posted September 10, 2015 CC 6.06, All In One Shipping 1.0.6, Product AddOns 1.0.5. browser: Google Chrome.More of an observation than an issue, since its impact is low. I create a product consisting of a physical item to be shipped, let's say an e-book on CD-ROM. Item A. It has a shipping weight of 0.12 kg. Later, I wish also to make the e-book available as a download - which is identical to the CD-ROM version except in the form of its delivery. Item B. As the item's description is quite long, and I'm lazy that way, I clone Item A, make a few minor changes to the description, change the category, add the digital download file, and save it as Item B - which is now listed as a digital item. Excellent. However, no matter how many times I change or delete the product weight on the General Information tab, when the product is saved, the weight reappears as 0.12 kg, and is featured on the product page on the shop site.Overall effect on my life, almost zero, but perhaps it's something that might be ironed out in a future release?Robin Quote Link to comment Share on other sites More sharing options...
bsmither Posted September 10, 2015 Share Posted September 10, 2015 I can see in the code where a weight of a blank entry when editing (adding, not so much) a product would be an issue, but you say that changing the weight from 0.12 to 0.04 (for example) still doesn't stick?(I would have to observe the AddOn mod's output to accept or reject placing blame on it.) Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted September 10, 2015 Share Posted September 10, 2015 I just tried to duplicate your scenario, but my product was successfully created with zero weight. I did not leave the weight blank, but changed it to zero. I do NOT use AIOS or Product AddOns, but USPS, and I'm on 6.0.7. Quote Link to comment Share on other sites More sharing options...
bsmither Posted September 10, 2015 Share Posted September 10, 2015 Created with zero weight? The clone process will copy the source product's weight. Was the source product's weight set to zero? Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted September 10, 2015 Share Posted September 10, 2015 I had a disabled product which had a 3 pound weight. I cloned it, changed the weight to zero, and changed the type to digital by checking the box on a test digital file I had available. It worked as expected. I enabled it and took it to Checkout in the storefront with no issues. Quote Link to comment Share on other sites More sharing options...
Robin Somes Posted September 10, 2015 Author Share Posted September 10, 2015 Hmmm, OK. If I *change* the weight, having cloned the product, then it stays at the new weight. If I set the weight to 0.000, then it stays set at that figure - and then, no weight appears on the product page of the site - exactly as I want.But it just seems a little odd that, once the Product Weight field has a value (even if that value is 0.000), it cannot subsequently revert to having no value - if you see what I mean.Robin Quote Link to comment Share on other sites More sharing options...
bsmither Posted September 10, 2015 Share Posted September 10, 2015 It is strange, but for some (possibly legacy) reason, the product's weight, stock level and stock warning level is ignored if the value is considered 'empty', except for specific values of '0' and '0.0'.PHP interprets values in POST submissions and GET querystrings as "string" variable types. So, an entry of 0 is not so much the physical concept of nothing present, but simply the literal character '0' that gets displayed. As such, there is a difference between the character sequences (strings of characters) of '0.0'and '0.00'. For the above mentioned settings, CC6 will discard a value that can be understood as 'empty' (not set, null, '' <- a string of length zero, 0, '0', '0.0', and false) except keep the actual strings of characters of '0' and '0.0'. Thus, note that '0.000' will not be discarded because the string representation of that value is not considered 'empty' as it is not the same as '0.0'.In conclusion, attempting to change the value to a blank text field will not work. You must enter 0.(There may also be code that, on the storefront, suppresses the display of the weight if the item is determined to be digital, even if some weight has been given to that item.) Quote Link to comment Share on other sites More sharing options...
Robin Somes Posted September 10, 2015 Author Share Posted September 10, 2015 Yes, thanks for the explanation; it's perfectly logical. Entering '0.000' achieves the end result anyway.Thanks again,Robin Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted September 10, 2015 Share Posted September 10, 2015 I double checked, and my test digital item does NOT show any mention of product weight, even though I have it set to show on checkout, unless I add a tangible product to the basket.. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.