-
40. Re: BC.Next Requests
Digital Fuel Web Oct 27, 2014 2:56 PM (in response to Liam Dilley)@Rob Dreaming is good right?
Cannot find the trigger thread Liam but yes, this kind of functionality would give BC one more notch in it belt to making it a complete solution. Something you otherwise need other servers for and that is overkill for often one simple tasks that many BC customers and developers cannot warrant the time & investment in.
-
41. Re: BC.Next Requests
Liam Dilley Oct 27, 2014 3:28 PM (in response to Digital Fuel Web)I think It was in PAB.
-
42. Re: BC.Next Requests
Liam Dilley Nov 2, 2014 6:08 PM (in response to Liam Dilley)Some modules do not support sorting, for example:
module_catalogueselectIt would be great if you pass these in a collection that your collection could handle the BC sorting, OR its own. Syntax in liquid in other systems is below
{% for aCat in catSidebar.items order:Weight -%}
Or
{% for aCat in catSidebar.items | order:Weight -%}
-
43. Re: BC.Next Requests
Liam Dilley Nov 2, 2014 8:42 PM (in response to Liam Dilley)Wholesale Pricing:
This is not as straight forward as it sounds of course but...
It would be great to show the wholsale price as a separate object for a product - Just for information pruposes, along with the sale price. These can just be something like...
wholeSalePrice:
originalSalePrice:
And just the values.
Why?
- Letting people know possible savings of being a wholesaler
- Showing the original price to wholesalers
- Doing math on the prices to show the discount saved
-
44. Re: BC.Next Requests
Liam Dilley Nov 2, 2014 9:05 PM (in response to Liam Dilley)I have emailed about this but I want to add it here.
BC with Liquid has a math issue. Yep there are some bugs with < etc that need to be fixed and product prices return as a string right now when they should be number values... BUT....
There is a further underlining issue here with data in this regard. BC basically returns a string for just about everything so doing math on values will be a bit of an issue throughout the system. Let's say you got a web app with custom fields for example. Your custom field value could be something that needs to be "2.4342" for example. You can not use the BC custom number field as that only accepts whole numbers (and probably still returns a string, lol) so you need to use text which will be a string.
But you may want to run liquid on that?
I do not expect the BC engineers to spend the time making sure any possible number field renders as a number and more, that would take forever.
BUT
If you BC guys could work on a custom filter to convert the value type then we could do a lot of the leg work ourselves.
{{ Something | type="" }}
This would have the following options..
boolean,
string
float
int
And convert one type to another. Most things would be a string to one of these other types though. This would solve a lot of this math or possible value type conflicts when people try to do if conditions etc.
-
45. Re: BC.Next Requests
Scott Shefler Nov 5, 2014 7:37 AM (in response to Liam Dilley)Awesome if this is already possible but if not I would like to request the ability to get the current date and time in globals. Something as simple as getting the current date and filtering out the year for the copyright would be great. I'm sure there are many more use cases for grabbing this kind of information but that is just a small one. I know shopify allows it buy doing something like this {{ 'now' | date: "%Y" }}
-
46. Re: BC.Next Requests
Liam Dilley Nov 5, 2014 12:23 PM (in response to Scott Shefler)It is documented Scott, but like the BC module date, BC actually does not expose the server date in the system. I am not sure why, I forgot what Cristinel told me now. As you know the module just renders some javascript and string date for the users date / time.
What do you think of the type idea though Scott, that should solve a heap of issues I think.
-
47. Re: BC.Next Requests
Scott Shefler Nov 5, 2014 1:36 PM (in response to Liam Dilley)Can we get the {module_json} file to render inside content holders/modules from placing it on the template. For example we have a json file that is storing all company information like phone, adddress, etc. Would be great to be able to add {module_json json="/_System/Json/company.json" template="" collection="company"} to each template then from anywhere we can call {{company.phone}}
Right now it only works to call {{company.phone}} from on the template itself or within a page. Not from within content holders or modules.
-
48. Re: BC.Next Requests
Liam Dilley Nov 5, 2014 2:00 PM (in response to Scott Shefler)You can pass as a variable into those modules scott
-
49. Re: BC.Next Requests
Liam Dilley Nov 5, 2014 2:00 PM (in response to Liam Dilley)mything="{{company.phone}}" then in the module..
{{params.mything}}
-
50. Re: BC.Next Requests
Liam Dilley Nov 5, 2014 5:39 PM (in response to Liam Dilley)Tag cloud tag object:
Currently returns the ID and name and one other object item.
To be useable you need to construct the tag cloud tag with url, the name and also know how popular it is (the class that is generated) and that class is currently not part of the object.
You can lowercase the name to form the tag cloud url, but it may be worth just including that for ease of use for people.
Ideal
- Name
- Url
- Class
- ID
-
51. Re: BC.Next Requests
Liam Dilley Nov 5, 2014 10:44 PM (in response to Liam Dilley)Paramater passing:
You can pass a parameter into a module list layout, but this will not come through in the detail.
Is it possible to have passed paramaters in the list & Detail view?
-
52. Re: BC.Next Requests
Gary Swanepoel | ITB Nov 6, 2014 11:12 PM (in response to Liam Dilley)Is there any possible way have a flag or something to push the page's {{this|json}} && {{globals|json}} to something like localStorage from the server?
This would allow us to access the data array in external JS files without have to render the json data in html on the page.
Or is there currently another trick to achieve the same effect?
-
53. Re: BC.Next Requests
Liam Dilley Nov 7, 2014 3:21 AM (in response to Gary Swanepoel | ITB)You have all the page json stuff if you remember Gary. Any page can be set to show its contents as JSON.
-
54. Re: BC.Next Requests
Gary Swanepoel | ITB Nov 9, 2014 5:14 PM (in response to Liam Dilley)I’m not sure if you understood my question Liam.
I want to access the JSON data but NOT have it print in the HTML. Hence why I was asking if we could have some facility to push the JSON to localStorage on the server, or special a JS variable.
Pushing the {{this}} && {{globals}} to a page variable allows me to access the data from an external js file.
-
55. Re: BC.Next Requests
Stephen_Blignault Nov 9, 2014 5:50 PM (in response to Gary Swanepoel | ITB)Hi Gary,
I like your ideas here, having a repository of JSON data auto created by BC sounds like a handy idea.
I’ve been using a similar concept by almost including all my Liquid code inside /_System/includes/ and inside this folder I place specific “functions” and random resources to create collections and run specific tasks. It’s not 100% ideal, it’s a manual process, but it works (at times).
What Liam was suggesting is you can get a JSON output on whatever page you’re after by simply applying &JSON=true at the end of the html page (I’m sure you were always aware of this). But this is not what you were after, I know.
-
56. Re: BC.Next Requests
Gary Swanepoel | ITB Nov 9, 2014 6:59 PM (in response to Stephen_Blignault)thanks stephen,
yeah .. the json flag is an alternative option but I still have to run a secondary load to pull it in and then have to wait for the data to become available before I can run any scripts that are dependant.



