I have a problem where I cannot figure out how to solve.
Lets say i have a company with products. I want to be able to add new products, delete products and edit current products.
I also want to list these projects on a product page.
I know how to add pages and so on. But does this require that i need to create a single page for each product? And then get all childpages information?
I am greatful for any suggestion!
It depends on what you want to do with the products. If you want to have a product detail page, then it makes sense to have a page for each product.
On the other hand, if you want to just list the products and not have a page for each one, you could use something like Archetype, or Nested Content.
It's also worth bearing in mind that if this is going to be an e-commerce site, there are a number of excellent options available that you could use for product management etc. You should investigate uCommerce, Tea Commerce and Merchello for example, to see if they offer the functionality that you require without needed to write too much yourself.
Work through the beginners' tutorial
https://our.umbraco.org/documentation/tutorials/creating-basic-site/
The articles parent and child model can be used for what you need (instead of "Articles Main" you'd have "Product Listing" and "Article Item" would be "Product"). If you don't need a specific page for each product just don't assign a template to the product nodes.
Related
I am building an e-commerce site using spree. I am new to Ruby/RoR and Spree, though not to programming and web development.
I am still carrying out research on logistics, pricing, which products to actually stock up on etc., so I simply want to display product information, and not the price and/or ability to purchase.
I have searched extensively online (to no avail), on how to do the following things I ave listed below:
I want to know how (perhaps, this requires code modification):
NOT show the price of products ANYWHERE on the site (including the product page)
On the product page, NOT show the 'Add to Cart' button
On the product page, SHOW a form that allows the user to register to the site, so that they can be contacted when the product becomes available
I am not looking for detailed steps, simply guidelines that I can follow to make the appropriate changes to the configuration (or code - if required), in order to meet these requirements.
You're going to need to override the view templates.
Try running bundle show spree or bundle open spree if you have an editor setup for bundle, this way you'll know which file you need to change. Its likely going to be somewhere here or in one of the partials, look around.
Then you can override it with deface, see Spree Docs here
If you want override the whole file, then just create the file in your app, for example, if you wanted to override spree/frontend/app/views/spree/products/show.html.erb from the gem.
You'd create the same file with your custom code in it, make sure to follow the same path and naming.
On an MVC view I need to display a form to insert user data and its courses.
For each course the user must choose: name, number of days and location.
And the user can choose many courses ... I don't know how many.
So basically this a form with a many to many relationship.
What options do I have for such a form that is easy to use?
You should have some entry points like a user or a course to view its details. For example, if you go to details of a user, you can see all the registered courses in a table/grid, you can have an autocomplete dropdown box for adding a new course. You can apply the same thing for a course details page as well.
I am building an online poster maker store with Ruby on Rails that gives the customer the option to either download a digital file for a generated poster or to have us print it for them and ship it to them. I am having troubles deciding where in my application to put this functionality. I am using a basic products, line_item, and cart structure.
Do I:
1) Make an option on the checkout that creates an Order if they decide to have us print the poster. If they just want the digital file it would just give them access on their user page after checkout.
2) Make a attribute on my line_item model that saves weather they want to download or print the file.
3) Something else entirely?
Thanks in advance for your help!
I believe I have found a solution! After talking to another developer friend, it hit me that the best solution might be to put all of the attributes for both printed and downloadable posters in the same products model and then expose only the information needed for each particular order.
For example,
If the order is to be printed by us, the user will be asked to fill out a shipping address form and asked what paper they want us to use. If they customer is just going to download the generated poster design these fields in the form will be hidden.
I believe that this is a much simpler solution then the two that I described above and will be the easiest to implement.
I have 8 plans for the user to choose from. These plans all represents forms which would results in products added into the cart.
A few plans will ask different questions. For example plan A,B,C would ask the user if he/she want to purchase additional addon. Plan D,E would ask the user the total credit to store in their account.
This seems to suggest that we have separate views for each of the plan. But this means we then need to add show and edit actions for each of the plan. A bit tedious. So I want to ask if there is a pattern for having record specific view in Rails.
Not really sure if this can be answered in any specific conclusive way, but I would use partials in such a case.
let's assume your plan has a type field somewhere you could do the following
<%= render partial: "plan_#{#plan.type}" %>
Whereas each of these _plan_X.html.erb partials contains the plan specific information you want to display.
This pattern can be adopted for all of your views (maybe your edit action has different data depending on your plan type etc.
I have done stuff like this before, but I want to figure out the most efficient way of doing this. There is my scenario:
A user can search our site. Depending on that search they have a number of refinements they can make to the data. There are categories for different refinements. Each refinement is represented by a checkbox. The refinements might look like this:
Appliances:
Washer,
Dryer,
Dishwasher,
Microwave
Rooms:
Family,
Dining,
Bedroom,
Game
Each refinement has its own ID. The checkboxes are not ASPX controls. The HTML for the boxes is being built server side. I may want to change that, but not sure if it is going to matter.
When the page is posted back to, I am building the breadcrumbs for it and preselecting (checking) the refinements that were checked. The breadcrumbs are not clickable. However, I need to keep track of what may have been previously checked. So the breadcrumbs should look like this:
Washer, Dryer > Bedroom > Microwave
Each ">" represents a new refinement search. The user can unselect a refinement a remove the item from the breadcrumb list. So let's say they uncheck Dryer and Bedroom:
Washer > Microwave
I need some suggestions on how I should keep track of the refinements and building / rebuilding of the crumbs. TIA!
I don't think breadcrumbs are the right metaphor for this application. Breadcrumbs are a navigational aid, to show the path someone took to get where they are, such as:
Home -> My Account -> Profile -> Edit Preferences -> Change Address
Meaning that the user entered the site via the home page, clicked the My Account link, etc. etc. etc.
This user should be able to get back to the Profile page by clicking "Profile" in the breadcrumb trail.
I think what you really want for this application is a Shopping Basket metaphor, where all refinements are added to a list, and then the list can be displayed at the top of the page in a "My Refinements" area. Bonus points for making the items in the list selectable via CheckBoxes for an add/remove functionality.
Generally, once there's an established metaphor, you shouldn't use it for something else, as users get used to a standard way of doing things. ( I recall coming across sliders being used for a list selector and it was very confusing. Dev. should have stuck with the tried and true Dropdownlist)
I'm making this Community Wiki as I haven't actually answered the question.
Well, i ended up using some hidden input controls to keep track of checkbox states.