- Posts: 86231
- Thank you received: 14224
Requests for Manufacturer and Supplier management
Please Log in or Create an account to join the conversation.
- jameswadsworth
-
Topic Author
- Offline
Please Log in or Create an account to join the conversation.
- jameswadsworth
-
Topic Author
- Offline
1) Missing the possibility to filter products by manufacturer in the back end. I know that many clients have a to update information pertaining to particular manufacturer and it is very convenient for them in for they can filter all the products by the manufacturer.
2) If you add a menu link starting the Joomla side there is no entry for manufacturer. I know you can choose either product or category then when setting the hikashop menu configuration you can set "Type of content" to manufacturer. It would be much more intuitive if there was a specific manufacturer link the Joomla menu tree
3) In the front end, while viewing a category product listing, it would be nice to be able to filter the results by manufacturer. I have hacked the front-end to do this. If you are interested in seeing these files let me know
4) Add the manufacturer name the product show page.
As always I look forward to your comments.
Please Log in or Create an account to join the conversation.
2. I see what you mean. It's however not really easy to put in place because of the way the menu types work in joomla. We'll see if we can come up with a solution. Otherwise it will stay like that.
3. Configurable filters will come later on.
4. We will have to add an option for that.
Please Log in or Create an account to join the conversation.
- jameswadsworth
-
Topic Author
- Offline
So could we not create a "product manufacturer" listing and in the product listing function add a way to filter by manufacturer instead of category?
In the case when manufacturers are organised into various different category we could modify the category list function so that it lists the manufacturer category listings instead of the category product listings?
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
first of all.. I am amazed by HikaShop and thank you developers for such a great product.
I have "solved" a problem for displaying all items by manufacturer in my own way. I just created new category under root and manually add category to every product (but it is very time consuming)
I am not a programmer so I don't know if this can be done, or maybe it is already possible but I just don't know how to do it?
I run a small cosmetic shop and my structure looks like this:
(example):
root/lipsticks/manufacturer1, manufacturer2, .../products
root/nail_polish/manufacturer1, manufacturer2, .../products
.
.
.
I was thinking - for now I can only assign manufacturer1 category to it's parent category (lipsticks, nail polish...)
But if I could assign a manufacturer1 to some other category this could be solved very easily.
manufacturer1 from lipsticks, and manufacturer1 from nail_polish could be linked to root/manufacturers/manufacturer1
Then a menu link can be created - Category listing that would display all products by certain manufacturer (root/manufacturers/manufacturer1)
Basically - if a product can be assigned to multiple categories, maybe a category could be too? (not just a parent category)
I tried to write all as simple as possible:) I hope you can understand what I'm trying to say:)
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
I did assign my products to multiple categories as a workaround, and it workes perfectly.
It was just a thought.. it would save some time if I could assign categories to other than just parent:)
Keep up with great work!
Please Log in or Create an account to join the conversation.
- jameswadsworth
-
Topic Author
- Offline
We are now working to update this functionality for version 2.6.0, which has implements an improvement in the interface and code, but we are having some difficulties in getting it to work. So far we have recreated the supplier box. The HIKASHOP_ADD_SUPPLIER button opens a popup window to select the supplier. We have created a javascript addSupplier function which inserts a new line with the supplier name and currency. However when we click on "Ok" in the popup window we are having difficulty in understanding the new logic for firing the addSupplier javascript function to add a new line to the supplier box with the supplier details while closing the popup window.
Any help would be most appreciated.
Thanks, James
Please Log in or Create an account to join the conversation.
I don't see the difference with the old versions for what you want to do.
It should still work the same as before.
You could actually directly change the code:
Please Log in or Create an account to join the conversation.
- jameswadsworth
-
Topic Author
- Offline
thanks for the pointer. We will look at this and let you know how we get on.
Thanks, James
Please Log in or Create an account to join the conversation.
- jameswadsworth
-
Topic Author
- Offline
we have updated the addsupplier php function which is attached. I have a couple of questions:
1) how do we fire our addSupplier javascript function
2) is it better to get the supplier data first as in the attached php function and pass it to the javascript function or get the supplier data via ajax call in the addSupplier javascript function?
Thanks, James
Please Log in or Create an account to join the conversation.
I guess that you want to add your code in the "addcategory" file of the view "product" which is called once you select a category in a "selectcategory" popup (which is what you're using to select the category I suppose).
Please Log in or Create an account to join the conversation.
- jameswadsworth
-
Topic Author
- Offline
we have the javascript function window.productMgr.addSupplier in the form_supplier.php file. When we run the function addsupplier which is in the file product/ view.hmtl.php we have
$js = 'window.hikashop.ready(function(){window.parent.productMgr.addSupplier({suppliers:'.$output.'});});';
But is it not firing this function. Are we getting this completely wrong?
Please Log in or Create an account to join the conversation.
- jameswadsworth
-
Topic Author
- Offline
Can we use the extraData variable in the dupRow function to insert the Supplier information we want to show in the new row? We could not find any example in the existing code where the extraData was used.
Thanks, James
Please Log in or Create an account to join the conversation.
Here is an example of how to use the dupRow:
Please Log in or Create an account to join the conversation.
- jameswadsworth
-
Topic Author
- Offline
your hint works perfectly, well almost perfectly
The SUPPLIER_CURRENCY is replace by the supplier currency id. However php treats this value as a string not a numeric string or integer and so the right value is not shown as selected. Type casting or intval converts the string to an integer but as zero.
Do you have any suggestions? Thanks
Please Log in or Create an account to join the conversation.
I'm sorry but I'm not following you.
The currencyType class just displays a dropdown of currencies.
If you're doing a custom work anyway, why not simply echo the HTML of the dropdown you want the way you want ?
The type.currency forces the currency_id to be an int so that when used in the MySQL query it cannot lead to a SQL injection. So we can't remove it and you can't bypass it.
But then, you can echo the dropdown yourself, it should be simple to do.
Please Log in or Create an account to join the conversation.
- jameswadsworth
-
Topic Author
- Offline
We use the extraData to replace the variables {SUPPLIER_NAME}, {SUPPLIER_ID}, {SUPPLIER_CURRENCY_ID} with the data we get in our addsupplier function (in view.html.php of the product). It all works perfectly. For example we choose a supplier with USD as their currency, {SUPPLIER_CURRENCY_ID} is replace by the value '2'. However if we run a quick test in the function display of the currencyType class, dump_var($value) returns string(22) "2". The value is two, but the string length is 22! Which corresponds to the length of {SUPPLIER_CURRENCY_ID}. So when the Joomla code makes a comparison of the key with the value although it looks like it comparing 2 == 2 really it is comparing string(1) "2" == string(22) "2" and hence it is not showing up as selected.
Any ideas how to make php "forget" the original string and evaluate just the value "2"?
Please Log in or Create an account to join the conversation.