ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
hi
I've been looking into rewards points. Not sure if already exists in EP4, but if it doesn't , it looks not too complicated to do it, but :
Now that EP4 as all those notifiers, what it's the best approach in terms of logic and performance, to incorporate in the core, or use another class, auto load , etc... ?
In this case, it would only deal with ration for categories that could be attach to categories file, and products... possibly in the full export.
Best Regards
“Though the problems of the world are increasingly complex, the solutions remain embarrassingly simple.” ― Bill Mollison
What data is applicable to the rewards point system as it relates to products? Ie, what changes are made to the ZC database to support this added functionality. If the only thing really modified is the products table, then no code changes are required. Would simply add the products table field data to the user defined fields in the admin configuration.
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
I don't have the updated module, not sure if it is the same, but for what I see, related to products it's only one table, the rewards master, that uses a columns "scope" to define if it is a product or categories, and "scope_id" to relate those cats / products IDs, and the rest to place the rewards ratio.
But I just have a quick look, so I'm talking in the air.
But, for what I understand , if it's outside the "products" tables, the user defined fields, doesn't "work"
edit: There's a global reward ratio, and the categories can all use that one or have there own ratio, but if one doesn't have hundreds of categories they are quite accessible ... but for me, the products it's more significant. That's the reason the I thought on doing it
Last edited by mesnitu; 7 Apr 2016 at 10:46 AM.
“Though the problems of the world are increasingly complex, the solutions remain embarrassingly simple.” ― Bill Mollison
You are correct the user defined field is good for only products table data. To incorporate something like this where data is being populated in a single table, I would suggest creating an additional link on the main EP4 page using the notifier that is in line with options like full export, categories, attributes, etc. Before that would pull in any definitions needed at EP4_START. Would add a file type/name, export filelayout and sql would be addressed by the default:section of the filelayout module listening for the desired "filetype" then well, I've currently run out of steam on describing the remaining export, but there should be an existing appropriate location to address a "new" filetype export. Import would more than likely be similar to what has been done for bookx, but more than likely be using the primary key of the rewards module table rather than a specifc products_id or category_id.
That last part said, two file types could be created, one for products and one for categories, or maybe three to then have a combined style. The user then could choose which method is easiest for their work method and controls...
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
I was checking , and the Features File , on import using the 9 status doesn't delete the featured product.
Is there another way ? Or this is not implemented ?
tahnks
“Though the problems of the world are increasingly complex, the solutions remain embarrassingly simple.” ― Bill Mollison
Actually the status 1 is not doing anything. And if a date is left blank I'll get the year 2036.
“Though the problems of the world are increasingly complex, the solutions remain embarrassingly simple.” ― Bill Mollison
This back to discussions you and I have had about the specificity of EP4. It has to date worked with ZC as one would work with ZC except in large quantities. Are you able to change the status of a product from the featured section of the ZC admin? As for the date, changes had been implemented in the main product area, will take a look at the featured section to see what has or has not been done to account for the absence of entered data/more recent PHP versions, etc... The expectation of a non-date when populating the database is 0001-01-01. The result of 2036 is entering 0000-00-00 which I thought I had seen even that this could be a database setup issue of having a default of 0000-00-00... (Issue brought to light in upgrading to ZC 1.5.5 and sql needed to correct for some date fields in some tables.)
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
Had the ability to start edting the above, but figured I would run out of time. I expect there to be comments that everything ought to be possible in a single upload, but there are some aspects that when working with multiple tables and many, many, many rows of data at once take an inordinate amount of time to process. Even EP4 has a file split operation to allow upload of multiple products as a result of the breadth and processing power (time) needed to import so many rows into so many tables. Yes some have been able to increase the number of rows by decreasing the number of fields (for other reasons as well) but there are still limits.
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
Never had used the featured file.
But I thought that would import, cause there's a import button, and all the status fields... so, this file should not be imported ? Or is just to change dates ?
I meant deleting a featured product, not the product itself.... I think the featured as it's own relation.
“Though the problems of the world are increasingly complex, the solutions remain embarrassingly simple.” ― Bill Mollison
Bookmarks