Drupal 6 Layout issue - php

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 " />

Related

Display a dynamic dropdown from custom PHP code inside Elementor Form in WordPress

I need some help and advice in the design of a Event registration form with Wordpress plugin Elementor Pro and ACF Pro. If these are not suitable, you can recommend any other plugin.
The users may send any number (from 1 to 10+) of delegates to our company event.
How can I collect the company information once, but then repeat the delegate name, age, telephone, email etc. fields to show X number of times (depending on how many delegates they want to register).
Ideally, it would be best if we could ask (Do you have any more people to register?). IF yes, then ask all the input fields for a delegate. If not, then get the form submitted and end.
Further, I want to load the name of the event from a SQL database, and use custom PHP to load the select list dropdown in the same form. Elementor does not seem to be able to do this. Again, once the event is selected, we will want to load the dates for that particular event from the database, via another dropdown/select function that would come from another PHP code.
Is there a way to use Elementor Pro & ACF PRo to create such a form. I need to have repeatable sections, logic, and also allows for custom php logic/functions to be created to populate select lists, and be able to cascade the dropdowns from the earlier choices, conditionally.
Any help or suggestions are really appreciated. If there is any other Wordpress plugin that can do this, do recommend. Thanks.
Well, using Dynamic.ooo is a good idea in sense of having Logical forms. But i am not sure if it can save the form in db...but i am sure that you can set it so that the forms are sent to your selected email. I myself have found this plugin amazingly handy, give it a try!

Drupal Commerce - Load drupal variations images instead of a select box

I am not a beginner with Drupal, but I am a beginner with Drupal Commerce. I have used Ubercart since this project.
Actually, If I create a product display, and then a few variations under this product, Drupal Commerce automatically creates select box with titles of the other variations. This is quite useful for almost all the e-shops, but not for this one. I need to replace select box with titles with just images, on which customer will be able to click on, and select variation type just by image.
I think that there is almost all the functionality in drupal commerce kickstart which I am using right now. But I do not know how to achieve the result. I have already tried editing product view, but was not able to make it working. I have also searched through core modules of drupal commerce in code, because I think that there should be just an array function with result of titles, but did not found something like this yet. I have searched whole internet to search for solution but did not found anything useful.
In some threads peoples use to solve similar problems with for example colors, to give the ability for customers to see the color squares instead of color select box, this is achieved by module, which some of devs written. Maybe I can edit this module?
Also, I have never ever created a module, I am a bit lost in drupal codes, but tried it before.
Here are the attachments for better vision:
http://ofca.sk/temp/printscreen.png,
http://ofca.sk/temp/result.png
Any advice will be greatly appreciated; I just need to be pointed to the right direction,
You can achieve this feature, the same way than Commerce Kickstart v2 does: http://demo.commerceguys.com/ck/tops/drupal-commerce-hoodie - note the color selector at the right middle.
This is done using Commerce fancy attributes module which allows you to render color or image selectors that come from a taxonomy:
This module provides a "Rendered term" attribute mode, that shows the rendered term instead of a radio button (degrades to a normal radio button when JS is off) on the add to cart form.
You've got a video demo of this module with a step by step to configure in http://vimeo.com/44308580
Thank you for an advice, but I still had not been able to make it working with fancy attributes module. I used another way using taxonomy and a few views, which done almost the same.
But I still think, It is achievable by Fancy Attributes.
Thank you again
I have created a module for this case: https://www.drupal.org/project/commerce_options_as_images
I use it on my projects.

Drupal custom field customization

I am using Drupal 7.
I created a custom field for article nodes, which is a text field, with unlimited values so it's essentially an unordered list. I want to be able to customize the area in which the new field is displayed, but no page.tpl.php it renders under the page content, with the body. The new field does not create a new block in which I can edit. I want to limit the containing div to 350px, and then place a 300x250px ad to the right. So the custom field list on the left, with an ad on the right. If anyone knows a way to doing this rather than finding the div ids and sloppily overriding the CSS to do this please let me know.
I'm not sure your use case and requirements are completely clear to me, but it sounds like you might want to read up on "Render arrays", a new-in-Drupal 7 feature which allows more fine-grained control of content output/display. This is part of the Drupal Core and the official documentation might be a good starting point, but there are many other articles and tutorials (use: "render array" Drupal <-- your search on Google) which might be helpful.

Simple CakePHP Portfolio

I am building a very simple website ( http://driz.co.uk/beta/ ) using CakePHP to show a portfolio of my work as well a few pages such as about me and contact. I was thinking of just creating each item for my portfolio as a page inside the /views/pages/ folder but seen as I'm wanting to learn a bit about CakePHP I thought it would be probably better to use a database and store each item in a simple table.
What I need to do is have a simple page like /portfolio/ which lists all my work to date and then links to each item I have so for example /portfolio/my-awesome-work/
I also need to list the items in the sidebar as shown in the link.
For each portfolio item I will need a title, a body (which will store the content and images for each item) and also the client information. I don't need any image upload capabilities as I will be just adding the HTML for it in the database table.
If anyone can help it'd be much appreciated.
Thanks
Hopefully you aren't asking for a full solution (frowned upon on SO)
First follow the blog tutorial : http://book.cakephp.org/view/1528/Blog
This is a great place to start as it walks you through all the basics.
As for your particular problem. Creating a portfolios table with all the fields you mentioned and baking the code (you'll know what that means when you follow the tutorial) as a starting point will get you half way there.
You could also add in an admin area to manage your system. This would mean you'd need to create a users table and add the Auth component

Adding values to a magento dropdown or multi-select product attribute while adding a new product

I'm wondering if anyone has found or written an extension that would allow a magento website administrator the ability to add values to their products attribute while adding the product. For example, if I sell books and want the book author to be in a drop down list so that it would be used in layered navigation, it seems odd that I would have to add the author via the attributes section before adding the product. From a workflow standpoint it really makes sense to have an "add new value" button next to the drop down on my add product screen.
Anyone have any thoughts or insight?
It's a piece of cake to do, if you know jquery and the (if I may guess) extremely simple model behind magento.
As the other guy said, throw some money and I'll do it ;)
Otherwise, real easy -> find where that dropdown is generated, add a button next to it that opens a popup which you fill "create a new thingie" stuff, create button -> +create +close +refresh your dropdown.
Definitely easy.
And considering the attribute dialog already exists in the tool you cold probably take most from there and just add the popup handlers / button / +refresh .
This extension can Import/Export products and customers from/to CSV file. Create categories, add attribute options, import images and media galleries, reindex, refresh cache, media and price rules automatically. In addition you can backup the entire database in SQL format.
So from above, once you make the csv file, you just have to add the Author header and it would build the list from there. However, the attribute must exist first. I am using this method for the creation of my own manufacturer attribute options.
AMartinez_CustomImportExport
Can't say I have, but I've developed something similar that creates an attribute and adds it to multiple products, it's completely possible, you just need to add something that will call the add attribute on the add product page or change the new product flow to allow a new attribute and add it if needed.
Don't let them scare you, it's not as hard as some people might describe :)
My curiosity finally took over my laziness and I managed to create the module author requested. It's available on github.
Please feel free to check it out and update it if you wish. Maybe in some near future I'll post it on Magento Connect, if feedback is good.
Here's some code that checks if an attribute value exists and adds it if it doesn't: http://www.magentocommerce.com/boards/viewthread/26234/
Shouldn't be too hard to integrate it with the "Add product" form.

Categories