How to start on modifying the admin portion of Magento - php

I need to modify the Magento admin system to allow authenticated users to find products via manufacturer and category.
So, basically, either two select elements which an option for each manufacturer/category, or two autocomplete boxes.
What I need help with is how to get started. I can guess I edit the views to add the controls (which I've figured out how to do), but then where would I add the code to allow this functionality? Do I modify queries or modify how the model gets the products?

Related

Joomla ACL for specific view in custom component

I've written an extension and I'm now trying integrate it into the ACL. I've been using the documentation here: http://docs.joomla.org/Developing_a_Model-View-Controller_Component/2.5/Adding_ACL
Thus far I've been able to set access for the entire component but what I really want is to enable one user group to perform actions on a certain "view", if you will, while another group is denied access to that particular view. I'm guessing it's what's explained here: http://docs.joomla.org/Developing_a_Model-View-Controller_Component/2.5/Adding_ACL#Adding_more_actions.2C_also_at_category_level_and_item_level
The problem I'm having is when I click the Options button and change the access options and save, the selected options aren't saved. I've added the asset functions in my table-class and I've added the asset_id column in my table.
http://i50.tinypic.com/ofsjtt.png
Does anyone know what I'm doing wrong? Is it even possible to separate permissions like this?
The viewing access level is called "ViewLevels" http://docs.joomla.org/Access_Control_List/2.5/Tutorial#ACL_View_Access_Levels_Examples.
If you want people to perform certain actions on certain items, then you need to create an other set of permissions for these items different than the component acl.
For example you have a shop component, you have ACL for the component but you can have ACL for the product categories only.

What database tables do I have to edit to get a product to show up in a Ubercart store?

I am trying to create a ubercart module which automatically updates product listings. I thought that I just needed to edit these tables
uc_products
uc_product_classes
uc_product_features
The problem is no matter what I put in these tables, no products are listed in the Ubercart store.
What other tables do I need to update to do this? Or what steps do I need to take to get this module to add and/or update the products viewed in the web page? I would love it if someone could show me how to do it without resorting to SQL.
In Drupal 6, products are referenced to nodes. You might look at the feeds or node import module for automated product listing updates/creation.
It seems there are a lot more tables to alter before it will show in the Ubercart store. However I don't think you need uc_product_features.
These tables are
node
node_type
node_revisions
uc_products
uc_product_classes
They must belong to a class defined in uc_product_classes and node_type.
node_revisions is what is displayed in the store front and node.staus must be set to 1. It is the publish variable.
Also
node.nid must equal mode_revision.nid
and
node_revsion.vid must equal mode.vid
otherwise in the store front listing for that item will be
"n/a"
And while it didn't tell me all I needed, I found the following site to be informative.
http://tiger-fish.com/blog/drupal-6-turning-existing-node-type-ubercart-product

Modx custom tv with multiple inputs

I need to build a custom tv in modx that will all a user to select a image, a title and a date.
Can't seem to find any help other than the docs with although detailed don't answer my problem.
Anyone done this before and are able to advise me further
Cheers
I'm not 100% sure, if this is what you're trying to archieve, but I think multiItemsGridTv (MIGX) for modX revolution is what you want.
From the docs:
MIGX (multiItemsGridTv for modx) is a custom-tv-input-type for adding
multiple items into one TV-value and a snippet for listing this items
on your frontend.
It has a configurable grid and a configurable tabbed
editor-window to add and edit items. Each item can have multiple
fields.
For each field you can use another tv-input-type.
Essentially, you can make up a set of multiple different template variables (including images), that always belong together. If you then assign your MIGX tv to a template, you can enter as much of these sets as needed per resource.
You can download it via package management or from the modX Extras Repository.

Symfony 1.3: Need to override backend filter field's set of data

My project is using Symfony 1.3.11, PHP version is 5.3.3.
Let me explain my case and my problem:
We wanted to add another kind of user, not just "user" and "admin" (using sfGuardPlugin). I did add "business" and I did give him permissions to only ONE admin module -- "purchases" (accessing own and under some conditions -- other people's purchases made on the site).
The "business" user can be associated to one or more Partners (firms) registered in the site, effectively allowing us to handle business owners or representatives a wee bit differently.
When the "business" user accesses the admin section, the list of purchases he sees must be this: All Purchases for all Products of all Partners he has associated with him. (Not exactly a trivial query).
I did that, in my opinion, in a stupid manner, but it does work -- namely overriding the "apps/backend/modules/purchase/actions/actions.class.php#executeIndex". I had to first copy-paste some code from the version of that method in the cache.
In short, I did hook myself to the "executeIndex" and added a code to do the proper Criteria, and the code works.
The problem now is this:
The filter field above the list (the one containing the Product list) does contain all possible Products. We want it to only contain all Products for all Partners the current user is associated with.
Thing is, it's my first time having to override the admin's filters and I am lost as to where should I plug my code.
Any help is appreciated. Thanks for your time.
UPDATE: Strangely very unpopular question. Nobody ever had to do this? Wow.
You have to unset the product_list and set another widget with the filtered choices.
Check this post where I explain something like that but using doctrine. In your case the sfGuardUserForm is your somthingFilterForm.
You could also filter data using this method. This is a little more elegant but both would work.

Magento - Multi-domain & Filters

We're looking to build in a filter to our Magento site with drop down choices for the first two options, a selection box for price plus a colour chooser.
Firstly how easy is it to fetch the info for the first two dropdowns from the database so the first box is populated with the first category then the second box populated with the choices for that particular category? (and then change if someone changes the first selection)
Secondly how easy is it to set up a separate filter for each site so it only fetches info for the corresponding store and doesn't show products from other stores?
The filter will only have to show the products when you press a 'find' button so I guess it's a case of building up the search query?
Thoughts and ideas on this would be great, only been working with Magento for a month so still not sure of it's full capabilities.
Thanks
For the second part Magento already shows only products relevant to a given store. When you set up the stores (in System > Store Management) you have the option of giving it a unique "root category". Creating root categories is easy, in Catalog > Manage Categories.
The first part requires some programming work. From your previous questions it looks like you have a good understanding of Javascript so AJAX is not a problem. I don't know how familiar you might be with PHP, listing products will require you create a new module, with it's own controller, that forms a collection from the selected category. Collections make their own queries so you don't need to write a lick of SQL, and they have functions for exporting as JSON or XML so you don't need to write that either. For an experienced programmer it would take almost no time at all.

Categories