I followed this tutorial Add Custom Edit Customer Tab to create a custom tab and page for my customer.
I would like to make it as dynamic page that fetches data from the database however I don't know how to start it.
So far this is my progress
All the codes were copied from Add Custom Edit Customer Tab.
I'm new to magento and I don't now how to start creating a dynamic page in the admin page.
My goal is to upload a PDF file for every customer and display it below.
UPDATE: My goal is to create a magento module that allow admin to upload pdf file in the backend and will dynamically display on the customer login page.
I would like to know were can I create/relate my database table/attribute so that it will get and store the exact customer ID and file.
Is there any tutorials or blogs that you can recommend?
In case I will create another similar customer page that uploads PDF file, is there a way also that I will not repeat my self doing the same code?
I hope you can help me.
Thanks!
The best way to solve that problem is to understand how to create a simple module.
Allan Storm has one of the best blogging tutorial that can help you.
If you already understand the basic of Magento module you can advance in making complicated admin backend.
You can start by building Magento Admin Grid.
You can start on this tutorial http://navaneeth.me/creating-magento-extension-with-custom-database-table/#.VkwhrXYrKUk upon following, update the rosource model and collection model, extend them with this
Mage_Core_Model_Resource_Db_Abstract - (extend this on your resource model)
Mage_Core_Model_Resource_Db_Collection_Abstract - (extend this on your collection model)
To create upload file, try to understand this link http://arabgento.com/en/techniques-of-uploads-files-inside-magento/
don’t forget to declare your from container with (‘enctype’ => ‘multipart/form-data’)
I hope this helps.
For upload pdf and display it :
If you want to display pdf than use use "iframe" tag.
If you want to convert pdf to png or jpg and display than upload the pdf using AJAX on server and convert that pdf using "imagemagick" and display.
Related
So im using the CMS Shopware 6 and I want to be able to add multiple Media-Entities (e.g. Images and Videos) to my ProductManufacturers just like it is possible to add multiple images/media to products.
I have found this tutorial on the developer.shopware page: https://developer.shopware.com/docs/guides/plugins/plugins/framework/custom-field/add-custom-field
Also I have looked into the ProductManufacturerDefinition Class and noticed that it just needs another OneToManyAssociationField.
Click Here to open IMG
Does anybody know if theres a way to overwrite this class or some other way to get this to work?
Thx :)
No, it doesn't help just with adding a new association. You can add custom fields to add media, but one custom field can add one image only. So, one way is to create custom fields for multiple media if it's limited and you know how many images/media needs to add.
OR
You have to add multiple media upload component in the Product Manufacturers module by making a custom plugin.
I am new to Joomla component developement and currently fighting with certain basic design patterns!
Lets say, I am developing a component where users can enter simple notes into their personal notebooks.
On calling the view "index.php?option=com_notebook&view=notes" I simply show a list of all note entries of the user. No problem so far, this is working fine.
Now I want to extend my component with the following feature: on opening the view "index.php?option=com_notebook&view=notes", I want to check if the user has already created a notebook before. If yes, I show all note entries, if not, I want to load a different view which contains a form to create a new notebook with certain options.
But how can this be done in a clean way?
For sure, I just can implement the form within the view "notes", but this is not the clean way, isnt it?
I also tried to override the function "display()" of the main controller and set the view manually if no notebook exists. But if I do so, I have to handle all calls to other views of my component manually within the function "display()". To solve this, I created a copy the original implementation from the class "JControllerLegacy" and changed it to my needs - this is working - but is this really the best way to handle problems like this?
So I ask you, what is the best approach to solve this problem?
Thx a lot!
According to me the best solution of your problem is to provide "New" and "Edit" button to your notebook listing page and create edit view of notbook. Same as Joomla has articles and article views.
So, As you mentioned above if use dose not have any notebook then he/she can create a new notebook using that "New" button. when user clicked on "New" button he has blank form where he/she can create new notebook.
here is the example how to create listing and edit view in Joomla. Hope this will help you.
https://docs.joomla.org/J3.x:Developing_an_MVC_Component/Adding_backend_actions
First of all I want to say sorry if this question looks silly. I am only 19 days old as far as learning Drupal is concerned!
Can an EntityForm data be used as a content of the site with a custom URL alias? What I am trying is as follows:
I am creating a website where I want to list hotels according to place. To achieve the above I created three content types - Place, Amenities and Room Type. These fields are coming up fine when I created the EntityForm type named "Add Hotel Information" and of course the data also got saved fine in database when I added a hotel.
But I have no idea of how I can see this hotel information like a page with custom URL something like localhost/tours/hotels/grand-hotel-shimla. How I can do this?
Thank you for your help!
I have attached a screenshot of EntityForm.
You can create a page to display the data with the module Views
https://www.drupal.org/project/views
With that you can define a url for the page.
This might help you get started with using the module
https://www.drupal.org/node/1917630
I would appreciate any input here.
I have some php code that I've developed to import a csv file into a custom table in the Magento db and then compare this data with data in the sales_flat_order table and display a simple report.
I now need to add a link to this page in the Magento backend so the guys using the backend can find and use it easily.
I have a bit of experience with adding new Magento modules, but I was wondering if there is any easier way to just add the Magento backend look and feel to my php pages and add a new menu item linking to them?
It seems like a big bloated exercise to have to have to go through the process of adding a Magento module and to have to re-code everything now that its already done.
Any help would be very much appreciated!
Just pop your link in the header links - header.phtml in admin template folders. Job done, not elegant but why spend any longer on it?
i have recently started to learn drupal 6. I dont have any previous experience with drupal.
I was asked to implement a page on existing drupal site with the following structure.
a sopping page which will have an thumbail size image with lable and a quantity text box. This pattern will repeat for 10 products. At the end of the page i should have a submit button which results in sending an email with product and quantity to dedicated email address.
If its just a form then i can use webform but the requirement is having an image for every product.
I am not sure how to implementn this...can someone guide me in the right direction please.
This is what i am trying to achieve(http://dontikurthi.com/sample.html)
thanks for the help in advance.
Cheers
R
For the image handling, I suggest ImageCache. If this is going to be a shop, use Ubercart. It's an extremely powerfull shop system with lots of functions and extensions.
It's hard to recommend a single way since Drupal offers many ways of doing it. I would go with CCK (let's you create your own content types with as many fields as you want) and/or Views (pulls data from many different areas of the database into viewable form, highly customizeable and on of the first modules to install together with CCK). Create a new content type with the help of CCK and create a view that displays this particular content type in a fashionable manner. That should get you pretty close to the image above.
When creating a form with webform, you add form components, and you can add "markup" type component: it describes itself as "Markup allows you to enter custom HTML or PHP logic into your form."
So, to add a picture above or below a form item, just add a markup and put the appropriate HTML in it.
eg <img src="http://localhost/picture.jpg " />