Edit: I have figured out a way to do it using custom field and column types. If there is any interest, I will try to post my solution here, please let me know.
I recently switched over to Laravel Backpack to manage my Admin Panel, but I am having a major issue right now.
I have Pages, Articles and Titles in my Database.
A Page or Article can have many Titles (each for a different language, a german title, english title, etc.), so they are connected via polymorphic 1:n relation:
public function titles()
{
return $this->morphMany('App\Models\Title', 'titleable');
}
Now, when I edit my Page (or Article), I want to also be able to edit all related titles. From what I understood, this is not possible at all in backpack and I am quite surprised that there is no native support to show a model's polymorphic relations when editing it.
Did I miss something or is this not possible at all with backpack?
Thank you for any advice.
Related
I am trying to create a dashboard to display a specific table and create/update the lines for this table via backpack laravel.
For example I want to display a table of area and this table has a relationship with the cities table.
my problem is when I want to add a specific area and the city associated with it is not added !!.
That I do not want to go to add the city then back to add the area.
This is a very small example of what I'm really dealing with ,
since I want to add a line in a table and this line contains relationships with other tables I want to create on the same page.
I searched and did not find a direct answer. Does it make sense that a new view should be created?
Does the Backpack Laravel not provide a solution to this problem?
If the answer is no and this is what I saw, what is the best solution to this problem ?
Image to summarizes the problem as I want to create the city on the same page as creating the area
I think what you’re looking for is what we call the InlineCreate Operation in Backpack. It adds a “+ Add” button next to the relationship field, so that the admin can add a related item right there, in a modal.
Check out its docs here.
I've seen quite a lot of extensions that do Year/Make/Model search of products, that's not what i am after.
What i want is to let a customer select his vehicle YMM (year make model) and once he did, i want all the products shown to only fit that vehicle in any category he navigates to. So say we have 2 categories - suspension and brakes; once the vehicle type is chosen, only parts fitting that vehicle will be shown under suspension and under brakes.
I also want to be able to define universal products which will be shown regardless of vehicle type chosen.
So far couldn't find such an extension.
Any help or pointers will be greatly appreciated.
I am open to implementing something myself if needed.
Checkout this extension : http://www.magentocommerce.com/magento-connect/parts-finder.html
I have gone through this module and with little modification,it serves both your purpose.
1) It has filters for individual categories as well. Lets say if you want that once filtered, the same products should be shown in all the categories, you can customize that little part on your own.
2) It has global import section,which will display the products regardless of the filters chosen.
I have seen this Year Make Model magento extension in many sites - http://mage-extensions-themes.com/magento-extensions/top-magento-extensions-for-auto-parts-store/year-make-model-professional.html
It seems to have high popularity in Magento Connect. You may want to try that.
We are planning to develop furniture shop with PrestaShop. I am a newbie with PrestaShop and am interested to know more about it. The following is the scenario that we have:
In the shop, we would like the top navigation to list the areas in the house (e.g. dining, bedroom, etc). When we hover this, there will be a dropdown menu with a list of furniture type (e.g. dining chairs, dining tables, and so forth).
In addition to that, the left side will be a list of "collections". Each collection can contain items that are of different furniture types. E.g. Collection A can have a dining chair, living room chair, and so forth.
In the list of collections, there is a possibility to have a "special" collection. This collection will have a different layout page compared to the other collections.
Hence, I am wondering if:
Is this possible to use Prestashop? I can see that #1 is possible using the categories feature (1st level category as the areas in the house and 2nd level category as the furniture types). Also, #2 might be possible using "Suppliers" or "Manufacturers". What I am concerned, is there a way to actually separate "suppliers" / "manufactures" as "specials"?
If it is possible, can we actually create a specialized page for these?
Thank you so much for your help everyone! Any kind of suggestions would be great! I look forward to hear from you!
For each of your 3 needs:
You are correct that PS's categories will allow you to do this. The category system allows you to have a hierarchy of categories that is as deep as you need, and what you described is exactly how it's meant to be used.
As you hinted, you can use either suppliers or manufacturers for this by simply changing the name to "Collections" and associating products with the correct suppliers (if you choose supplier instead of collection). You can add a description to a supplier or manufacturer that will appear by default before the list of products.
You can add a custom description to each supplier or manufacturer page, but I think you're looking for even more variation. If the layout change you need for "special" collections isn't too extensive, you could achieve it by doing something tricky in the page template which checks what page is currently being displayed, and shows or hides HTML or executes Javascript based on the result. This would provide quite a bit of flexibility, even though it's "dirty" in the sense that you'd have to hardcode information in a template. A better way to achieve this would be to override the manufacturer controller (assuming you chose to use the manufacturer to represent collections) to use a different template for certain manufacturer IDs. I haven't tested this code, but I think it's pretty close to what you'd need to put in the override directoryalong with a new template called manufacturer-custom.tpl in your theme:
class ManufacturerController extends ManufacturerControllerCore {
// array with the selected manufacturers
private $customManufacturers = array(1, 2, 3);
public function init() {
parent::init();
if (in_array($this->manufacturer->id, $this->customManufacturers)) {
$this->setTemplate(_PS_THEME_DIR_.'manufacturer-custom.tpl');
}
}
}
What I am trying to do using asp.net MVC3:
-User selects a Category from a list of Categories.
-The SubCategories page then displays a list of images found to represent that Parent Category as well as the list of SubCategories.
I run into the need for multiple models because the "Category Images" are associated with Category and not the "SubCategory model". Yes I realize this seems like it has been asked many times before but the syntax is still foreign to a noob like me. What goes where?
I got the Category -> Html.Actionlink to the controller to return a list of SubCategories part... but even if I did some left join to get category and list of images as well, how would I get those into the same view as the list of subcategories?
Update
Found this posting:
http://francorobles.wordpress.com/2011/05/03/returning-multiple-models-in-1-view-in-asp-net-mvc3/
Question: Is that a valid approach? My intellisense suggests no.
In cases like this you need "view models", i.e. view-specific models that have all the data your view needs.
i need to find a creative way to post employee bios.
right now i just have it in a table, alternating bio and pictures, like this:
person 1
[picture] [bio]
person 2
[bio] [picture]
person 3
[picture] [bio]
person 4
[bio] [picture]
its really hard to maintain when i need to add or remove a person.
could anyone suggest an extension i could use for this?
it does not have to use a table, just look good(creative) and be easy to maintain
thank you!
I would suggest the best way would be to create a category for your employees then use a category blog layout with multiple columns. This would give you a nice first page where you could have name+picture, and then upon clicking their name you view an individual page about that person.
Should you choose this solution (I am assuming 1.5). Create a category for employees and create an article for each employee within this category. Seperate the photo from the main content using the "read more" button.
Then goto menus->main menu->"new"
The type you want to select is articles -> category -> category blog layout.
On the next page, pick the category you created earlier on the RH side, and just below that you can specify how many columns and how many employees to view per page.
Hope this helps, the same method loosely applies to Joomla 1.6, however, categories are setup differently.
I found a solution - DJCatalog Extension did the trick :)