Stuck on Project - Trying to Create a Catalog with JS
Please be gentle; I'm familiar with CSS and HTML but newbie to JS.
So here's what I'm trying to do:
I've got a WordPress site that features a bunch of different products on it. there are categories and subcategories--and there's a lot of products, and only to be adding more. So I came up with this idea that it would be so much easier if I could do the following two things:
1. Create a "master" catalog of all of the products, assigning each product and each category an id. That way I could create an individual product page for each product and write the specified product's description, picture, etc. to the product page by element id. Also I could create category pages and subcategory pages and write these to their respective pages using the same method.
2. For certain pages, my vision also includes being able to have an introduction paragraph/image and a row of product names and photo thumbnails on load, and then the introduction paragraph/image element is replaced when you click on the product images below it -- so when you get to the page, you see the intro and some product pic thumbnails. And when you click on one of the thumbnails, an element with a larger pic and respective product description replace the intro paragraph/image element. (The ideal way of being able to do this is to somehow call the element by id onclick -- but I haven't figured out how to do this; the part I'm missing is whether or not it's possible to use an element to replace the original element, and how to do it. )
Something else I really would like to do is create a template for my pages that I can make sure the formatting and everything is right but just call the different elements I need from the external "catalog" file so I could just reuse the same template for my product pages (would save me a lot of mistakes and time!)
Thank you in advance for your help. Been working on this project for over a week and am about fried with it!
Again...Please be gentle with me. I'm quick to learn but new to JS; most of the tutorials I've found (even W3 Schools) haven't been quite thorough enough for me. I'm not sure where the gaps in my learning are, but I really need to get this project done ASAP! Thanks!
It sounds like this is more related to PHP and database work. What are you trying to use JS for?
I'm always up for networking with fellow web professionals. Connect with me on LinkedIn
if you like!
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)