Print Page | Close Window

Show Fields Anywhere

Printed From: ProductCart E-Commerce Solutions
Category: ProductCart
Forum Name: Using ProductCart
Forum Description: Running your store with ProductCart
URL: https://forum.productcart.com/forum_posts.asp?TID=3949
Printed Date: 04-December-2024 at 9:32pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Show Fields Anywhere
Posted By: SharpDataInc
Subject: Show Fields Anywhere
Date Posted: 23-August-2010 at 6:33pm
How do you pull out a price and show it on any page? Say I have the ID number and want to show "Price List" and "Online Price"? How would one go about and do this with ProductCart? Plus, the long and short descriptions, how can I display what I want when I want? Is there a link to help on these topics? In short I guess, how can I specify what field I want and show it anywhere I want?

Thanks
SDI

-------------
Sharp Data Incorporated



Replies:
Posted By: Hamish
Date Posted: 23-August-2010 at 6:53pm
Hi,
  Do you mean on a page outside of ProductCart, such as a Blog etc? If so then see : http://wiki.earlyimpact.com/widgets/productcart_ecommerce_widget - http://wiki.earlyimpact.com/widgets/productcart_ecommerce_widget

If you mean within the ProductCart pages themselves, then there is a lot of flexibility built in  (see the wiki for full details).

ProductCart allows you to use your own design, in fact it's specifically designed around supporting custom designs. It's also very easy to amend the "static" text on a site and styling can be managed via CSS.

There are quite a few layouts to choose from, which meet the needs of the vast majority of stores, but beyond all of those you are free, if you wish, to modify the ASP code, although you are then responsible for supporting your own modifications through future upgrades.
    


-------------
Editing ProductCart Code?

See http://wiki.earlyimpact.com/developers/editcode" rel="nofollow - WIKI Guidelines for Editing ProductCart's ASP Source Code



Posted By: SharpDataInc
Date Posted: 23-August-2010 at 11:17pm
Thanks for the feedback. Actually, its on the website. I am editing a site and changing over pages of hard-code prices and descriptions to the related database record. I cant find in wiki where you can get any field you want, what the fields are, or even what html to use to get and display the records. This client would have a page that grabs the image, long desc and list price from the database. Then user would click "add to cart" and it would show short desc and different online price from that ID of the added record in the show cart page.

That widget is pretty cool though. Nice idea!

Can you point me in the right direction if this can be done?

Thanks
SDI

-------------
Sharp Data Incorporated


Posted By: Greg Dinger
Date Posted: 23-August-2010 at 11:27pm
I'm not sure if there is documentation of the tables.  Absent that, step 1 is to open your database and examine the table named products.  That will allow you to become familiar with the field names. 
 
Then you would want to establish a query in your page to retrieve the product record and set the variables to be displayed on the page.  A good place to start is to dig into viewPrd.asp, viewPrdL.asp and viewPrdCode.asp to understand how the cart handles this task.
 
 


-------------
GreyBeard Design Group

Certified ProductCart Developer

Web Design/Development/Hosting

http://tinyurl.com/5c8t4t" rel="nofollow - Add-Ons & Custom Code |


Posted By: Hamish
Date Posted: 24-August-2010 at 5:53pm
Hi SDI,
    I think your planned approach sounds like hard work! Add a category and a few products to it and try the different layout options to see if there is one that is close enough to what you want. Showing info about the products after the customer has clicked "add to cart" is a bit late anyway :-)




-------------
Editing ProductCart Code?

See http://wiki.earlyimpact.com/developers/editcode" rel="nofollow - WIKI Guidelines for Editing ProductCart's ASP Source Code



Posted By: SharpDataInc
Date Posted: 24-August-2010 at 10:49pm
There are two pages used here. One page shows the product with the online price and short description. There is a button for details, which the user clicks and sees the different options for the product (ie, small, med, large), full detail and their Online Prices. the user selects the option and "adds to cart" then the cart shows a lower price - list price. A web designer created the whole store front w/o any asp to it - detail/add2cart button page (hard coded it). I am redesigning after the add to cart asp page, right now. That page that uses the view cart, and my own header/footer. That works fine with showing the list price, I just wanted to show the descriptions and online prices out of the database on the other pages - I will have to redesign them later. It would be cool if you could send an script with an ID and get back the different values. I don't see any help on that either, though.

I just wish there was documentation, like the "add to cart" from anywhere docs.

Thanks for the time
SDI

-------------
Sharp Data Incorporated


Posted By: SharpDataInc
Date Posted: 26-August-2010 at 8:30am
mmmm, well I took a look at some of the sample sights using ProductCart and it seems they have hard coded prices in their web pages. Once you click "add to cart" and view it, the page shows the product added and the price from the database. But if you are not in the cart yet and on a html/php/asp page the pages that shows the details they have the hard coded prices on them. From the sites I saw, this is not logical for updating the prices/descriptions or what ever you edit with the ProductCart interface. Is this not possible to do with ProducCart? Show any field from any table, anywhere on any page? A developer never wants to hard code the values and if the client changes it in the database, the developer needs to redo a whole page(s) and upload it. Instead it should be read across any page anywhere and never touched by a developer. It seems ProductCart can do this, I jsut dont see anyone doing it or any samples on doing it. Has anyone done this? Dynamic images/descriptions/prices, etc..
 
Thanks for any info you can provide.
SDI


-------------
Sharp Data Incorporated


Posted By: Greg Dinger
Date Posted: 26-August-2010 at 9:54am
<<<mmmm, well I took a look at some of the sample sights using ProductCart and it seems they have hard coded prices in their web pages. Once you click "add to cart" and view it, the page shows the product added and the price from the database. But if you are not in the cart yet and on a html/php/asp page the pages that shows the details they have the hard coded prices on them. From the sites I saw, this is not logical for updating the prices/descriptions or what ever you edit with the ProductCart interface>>>
 
Would it be possible for you to post links to these sample sites you refer to?  It's just not possible to help without seeing what you are looking at.
 
<<<A developer never wants to hard code the values and if the client changes it in the database, the developer needs to redo a whole page(s) and upload it. Instead it should be read across any page anywhere and never touched by a developer. It seems ProductCart can do this, I jsut dont see anyone doing it or any samples on doing it. Has anyone done this? Dynamic images/descriptions/prices, etc.. >>>
 
That is why Hamish stated what he did.  How about showing us the old site as well so that we have in context just what you are trying to do.
 
 


-------------
GreyBeard Design Group

Certified ProductCart Developer

Web Design/Development/Hosting

http://tinyurl.com/5c8t4t" rel="nofollow - Add-Ons & Custom Code |


Posted By: SharpDataInc
Date Posted: 26-August-2010 at 10:09am
First PC example - http://www.webtappeti.it/productcart/pc/Home-WebTappeti.asp - http://www.webtappeti.it/productcart/pc/Home-WebTappeti.asp
The prices/images/descriptions are all hard coded, not optimal. My client has something similar to this website. Shows the product, image/description/ListPrice, then you can click add to cart and its in the cart with the OnlinePrice showing in the cart ASP.
 
Thanks for the assistance
SDI


-------------
Sharp Data Incorporated


Posted By: Greg Dinger
Date Posted: 26-August-2010 at 10:18am
I will grant you that this site demonstrates the procedure that you point out.  However, the Home-WebTappeti.asp page is a custom page, not part of ProductCart.  The prices you refer to are placed in images, presumably to suit the esthetics of the designer or site owner. And yes, as you propose, maintenance would be a bear.  But this was a choice that they made and not reflective of ProductCart functionality.
 
Once one reaches a product page such as this, further explanation can clarify the behavior:
http://www.webtappeti.it/productcart/pc/CASCADE-BLACKREDWHITE-4p1295.htm - http://www.webtappeti.it/productcart/pc/CASCADE-BLACKREDWHITE-4p1295.htm
 
PC has price-sensitive attribute.  The base product in this case is set to 0, and the attributes themselves are priced.  Only when you select a size from the dropdown does the price appear.  I'll also point out that the layout of this page, and I'm pretty certain the manner in which the prices in the dropdown are displayed, is totaly custom.  It's all nice, and far from stock presentation.
 
So, with all that said, may we see the site you are migrating FROM (and perhaps the new design) so we understand the context of your original questions?
 


-------------
GreyBeard Design Group

Certified ProductCart Developer

Web Design/Development/Hosting

http://tinyurl.com/5c8t4t" rel="nofollow - Add-Ons & Custom Code |


Posted By: SharpDataInc
Date Posted: 26-August-2010 at 10:41am
Great now you can see what I am after!

This is the ORIGINAL site (no PC) - http://www.cpapplus.com/aed/ZollAED.htm - here

The new site looks similar and uses PC. The designer didn't integrate with PC at all, but you can see this page can have PC easily embedded into it. It shows a desc/price/image, the first on works on "details" - you click it and it goes to the cart and this is hard coded too (can have PC embeded as well). Once you add it, I coded it to use PC and pull the price. Once at the checkout you can see the price difference. BTW - SKU is hard coded as well, this again is very bad design.
New page - http://www.cpapplus.com/aed/aed.php - here

Greg, thank!
SDI

-------------
Sharp Data Incorporated


Posted By: Greg Dinger
Date Posted: 26-August-2010 at 11:35am
I would probably approach this differently than you are.  There is an easier path to your goal.
 
Apparently one of your challenges is that your designer created the site design outside of the context of knowing ProductCart so that they could take advantage of something close to the stock layout characteristics of the application.
 
I also question mixing PHP pages with ASP pages in the same application.  Among other issues, you exclude from the site any potential of grabbing the cart totals for display in the header.  Perhaps there are other reasons why you want PHP, other than perhaps greater familiarity with that language.  But if that is the only hurdle, it's probable that a pure ASP solution could be crafted here.
 
Seeing where you are going, creating all of these static pages with hard-coded references to all of the product data is going to create a nightmare - both for initial creation as well as ongoing maintenance.  Let me show you a different approach.
 
Compare, for a moment, these pages:
http://www.cpapplus.com/miscellaneous/care-pad.php - http://www.cpapplus.com/miscellaneous/care-pad.php
http://www.systemthree.com/store/pc/Board-Defense-c24.htm - http://www.systemthree.com/store/pc/Board-Defense-c24.htm
 
Consistent to both of these pages is that there are two product sizes listed, available for purchase.  Distinction is that you hard-coded your page, and SystemThree is using a stock PC page.  Big difference is that your description is below, ours is above, but that's just a code placement issue.
 
PC supports a variety of category display formats that are switch-selectable.  In the case of SystemThree, we manipulated the format M (multiple add to cart) layout into what I show above. 
 
Now look at this page to understand what the page looked like before we started:
http://www.earlyimpact.com/demos/standard/pc/Jewelry-c10.htm - http://www.earlyimpact.com/demos/standard/pc/Jewelry-c10.htm
 
I think you might be able to imagine that the care-pad.php page could become a category page, and that the format you are showing on that page could be closely achieved, while maintaining stock functionality and not having to go the route of beating your head against the wall with all of these static pages.
 
Does this help you understand that there is an option beyond your current approach that would have a much easier future maintenance life?


-------------
GreyBeard Design Group

Certified ProductCart Developer

Web Design/Development/Hosting

http://tinyurl.com/5c8t4t" rel="nofollow - Add-Ons & Custom Code |


Posted By: SharpDataInc
Date Posted: 26-August-2010 at 12:15pm
Greg,

Thanks for the input and I see your point. My client already paid a designer to do the site pages and the CSS. I cant go about and change all the layouts, unfortunately, unless I can convince my client. My job entails me to get PC involved in the products listings on the new page designs. Those websites you showed both have hard coded information. I needed to have those pulled from the database. These examples have the description/sku and price being hard coded. Can pulling that data on that page be done with PC?

Thanks again
SDI

-------------
Sharp Data Incorporated


Posted By: SharpDataInc
Date Posted: 26-August-2010 at 12:22pm
BTW - the pages are only using PHP, due to using one files for the header/menu/footer, etc on all pages (100 or so). With includes pointing to a couple html files, lot easier to maintain than 100 pages when something changes. This is another reason why I want to use the PC DB for the product information on other pages, obviously easier to maintain. Now I can go the ASP route if thats what PC requires...

-------------
Sharp Data Incorporated


Posted By: Hamish
Date Posted: 26-August-2010 at 12:38pm
Hi SDI
Prices are never hardcoded on ProductCart pages, nor is description or anything else specific to a Product or Category.
Trying to build a website to fit exactly to a design by a designer who has no knowledge of ProductCart is, as Greg has pointed out, a recipe for lots of pain and expense, both now and in the future - this would be true of any e-commerce application. In fact, ProductCart offers more flexibility than most.
I think you need to have a conversation with your client to make this clear to them.

An analogy would be designing a car without taking into account the engineering side, like engines wheels etc. Yes, you can design a very pretty vehicle, but then doing the engineering to fit within the enforced limitations of the sketches means you will end up with an impractical, very hard to maintain and overly expesive vehicle.
Working in collaboration with the designer, so that they are aware of the options available, means you can keep the stock functionality, along with the lower costs and easier maintenance that results in.
You can still change the CSS (and keep your designers CSS) buttons etc and select from many layout options etc as well as wrapping a very stylish header and footer around the pages. The flexibility is huge - just look at the sites here : http://www.earlyimpact.com/stores.asp - http://www.earlyimpact.com/stores.asp .       

Looking at http://www.cpapplus.com/aed/aed.php the centre of the page looks to me like a fairly standard ProductCart layout (all dynamically created -or would be by ProductCart) and the category menu could equally be standard ProductCart.



-------------
Editing ProductCart Code?

See http://wiki.earlyimpact.com/developers/editcode" rel="nofollow - WIKI Guidelines for Editing ProductCart's ASP Source Code



Posted By: Greg Dinger
Date Posted: 26-August-2010 at 12:43pm
The systemthree site is using native PC code, albeit somewhat rearranged.  The content on that site, at least in terms of the product category page I showed you, is dynamic.  It is not static.
 
And what I am saying is that a knowledgable PC developer can likely replicate something in the area of 90% or greater of what you show on http://www.cpapplus.com/miscellaneous/care-pad.php - http://www.cpapplus.com/miscellaneous/care-pad.php  within PC alone, albeit with modifications as stated above.
 
Just to be clear, I'm not trying to sell a job to you.  We have plenty of work on our plate at the moment. I'm just trying to point out that from the perspective of many years experience working with different e-commerce sites and platforms, and having seen sites where all of the product data was being incorporated into static pages such as you are, you are creating a monster that will be difficult to tame.  With that said, were I to do precisely what you are doing in terms of all these static pages, the part of this approach I would change is to change to .ASP, and use some functionality such as I mentioned early in this thread.  I'd have variable on the page that would represent category or product ID values, and that those values would be used to pull data from the PC database. (You could do the same thing in PHP as that appears to be the environment you are most comfortable.)  At least that way if the product data is changed in the future those changes will be reflected on the pages dynamically.  This is not the option I would choose, but it is an option.
 
The bottom line is that now that I have shown you an alternative approach that would make your site fully dynamic, I'd be very seriously discussing a new direction with your client as the lifetime maintenance headaches you are creating with the current approach will easily outweigh the short term cost impact associated with implementing a better solution today.
 
I'm just trying to help and have no vested interest in this - but since you don't know PC I hope all of this gives you a deeper insight as to possibilities.


-------------
GreyBeard Design Group

Certified ProductCart Developer

Web Design/Development/Hosting

http://tinyurl.com/5c8t4t" rel="nofollow - Add-Ons & Custom Code |


Posted By: Greg Dinger
Date Posted: 26-August-2010 at 12:53pm
ProductCart uses an included header/footer as well.  By choosing PHP, you are likely doubling the header/footer pairs that must be maintained in your store - one for the PHP pages and the stock pair for the store. As such, if you changed to .ASP pages then you could use the included header/footer from the store for all pages.
 
You are making your project so much harder on yourself and your client than is necessary.


-------------
GreyBeard Design Group

Certified ProductCart Developer

Web Design/Development/Hosting

http://tinyurl.com/5c8t4t" rel="nofollow - Add-Ons & Custom Code |


Posted By: SharpDataInc
Date Posted: 26-August-2010 at 12:53pm
I agree completely with you and Hamish. I am learning PC as we move along here, I just wanted to know if it was possible to pull the info out of the PC database for those pages that have hard coded values. If ASP is the way to do that instead of PHP. From what I've seen with PC it is pretty powerful and has lots of flexibility, I just couldn't find out if it could do what I ask for now.

Thanks
SDI

-------------
Sharp Data Incorporated


Posted By: SharpDataInc
Date Posted: 26-August-2010 at 6:24pm
So if I go the ASP route with this instead of PHP, and go through the store front in PC, the prices/descriptions, images, etc are all through the DB right? I believe PC has layouts available to setup different styles of the store front. The store front can use the new CSS from the designer and still use the DB as its products? My client has the BTO system of PC. I want minimize the work ahead of maintainace to the website. So, if its possible to use the header/footer.asp that I created for the viewCart, the same can be used for the store front. I think I am on the right track here as far as how I want this to go with PC, I just want to make sure the look and feel is what my client is after, or looks similar to the new style layout.

Thanks for the help fellas
SDI

-------------
Sharp Data Incorporated


Posted By: Greg Dinger
Date Posted: 26-August-2010 at 6:36pm
The basic answer to all of your questions is yes.  The extended answer is that to pull off what we did with SystemThree.com, where we accomplished a page layout that is very close to your proposed layout, takes understanding of ProductCart and ASP. 
 
If you build the store as I am suggesting you will replace the significant effort of messing with all those static pages with an effort to knock the category page layout into shape.  It's not an easy task, and it's going to take some hours for even someone skilled with PC and ASP, but the payback is that when finished you have a totally dynamic store.
 
So - do you any ASP coding at all?  Or does this sound like something you want to push to a developer who has the above skills, knowing that when it's done you don't have to deal with all those static pages, and with the proper category + product data prepared in the  database that basic goal will have been achieved?


-------------
GreyBeard Design Group

Certified ProductCart Developer

Web Design/Development/Hosting

http://tinyurl.com/5c8t4t" rel="nofollow - Add-Ons & Custom Code |


Posted By: SharpDataInc
Date Posted: 26-August-2010 at 6:50pm
I know ASP.NET, VB.NET, C#.NET, WPF, and MS Expression. This isn't much different. What happened here is the client paid someone to redo the website in HTML, 2 years later it was done. Two years because nothing was set for includes or anything like that to make it easier to maintain. Designer didn't know ASP or PC, so I took over and things were a mess to start. Too much hard coding, store front was done wrong, misspellings, menus didn't work in the headers, just a plain mess. So instead of going through each file I created PHPs for the headers/footers, etc, so all the HTMLs needed to be converted. Then PC came into the picture for me, because I started researching it. So I did the ViewCart.asp with my custom header/footer.asp, and it worked great. I did a couple product pages and it was stupid to hard code the prices, etc. and I wanted an easier way. I didn't know if PC could do it. But in reality I need to use PC store front instead of all the static HTML pages, still keeping the new CSS. Issue is with GoDaddy host, on a Windows server, keeping them ranked at the top. Using .htacess cost money w/ GoDaddy $50! Ha. So maybe I leave the index.html as is and point to all the ASP pages. Redirects are a b##, but doable.

Thanks for all the guidance, first time using PC and I dig it. If this project was from scratch, it would be a lot easier!

SDI

-------------
Sharp Data Incorporated


Posted By: Greg Dinger
Date Posted: 26-August-2010 at 7:11pm
Don't get me started on Godaddy.  Please search the forum for the various rants from Mark, myself and others about how badly Godaddy bites.
 
As for .htaccess, my servers and those of selected developers around here are equipped with http://www.helicontech.com - www.helicontech.com ISAPI_Rewrite 3, and that is a feature of our standard hosting plans.  You can build all the rewrite rules you can think of.
 
Give me a shout if you want to discuss all of this.


-------------
GreyBeard Design Group

Certified ProductCart Developer

Web Design/Development/Hosting

http://tinyurl.com/5c8t4t" rel="nofollow - Add-Ons & Custom Code |


Posted By: SharpDataInc
Date Posted: 26-August-2010 at 7:23pm
Thats a solid link. Though GoDaddy wanted $50 for the install of the rewrite 3 full version. Huh! Well there is a saying - "Friends don't let friends host on GoDaddy!" Not a fan either, but I like the commercials, and some of my clients host on them, so unfortunately we are stuck with them!

Greg, thanks for all the help. I will definitely let you know when an ASP page up and maybe you can take a peak. Start to finish, store front to cart. Always up for suggestions, I leave the blinders on when talking to the wife!

SDI

-------------
Sharp Data Incorporated


Posted By: Hamish
Date Posted: 26-August-2010 at 7:32pm
Hi SDI,
  I just wanted to make sure you have seen & read the WIKI page re integrating ProductCart with your own design : http://wiki.earlyimpact.com/productcart/storefront-integrate - http://wiki.earlyimpact.com/productcart/storefront-integrate

Hamish


-------------
Editing ProductCart Code?

See http://wiki.earlyimpact.com/developers/editcode" rel="nofollow - WIKI Guidelines for Editing ProductCart's ASP Source Code



Posted By: Greg Dinger
Date Posted: 26-August-2010 at 7:35pm
<<< will definitely let you know when an ASP page up >>>
 
I still think that we may be talking past each other.  You do not need to make custom ASP pages.  You want to do this with strategic changes to viewcategories.asp.


-------------
GreyBeard Design Group

Certified ProductCart Developer

Web Design/Development/Hosting

http://tinyurl.com/5c8t4t" rel="nofollow - Add-Ons & Custom Code |


Posted By: SharpDataInc
Date Posted: 26-August-2010 at 7:44pm
Whoa, yeah your right we are. I just looked into what is in the product cart PC folder. The home.asp, viewcategories.asp, are what I want to use. They already point to my custom header/footer.asp. Sheesh, I really didnt see this as being that simple, but it is. All the store front files are right there. I need to dig into that deeper.

Hamish, yeah I read that and got the viewcart.asp to work with the h/f.asp. Now I see it can be used with everything derived off the database. With some tweaking to some of these files in PC, this should be a pretty smooth transition.

Thanks
SDI

-------------
Sharp Data Incorporated


Posted By: Greg Dinger
Date Posted: 26-August-2010 at 7:53pm
Simple, but not so much.  It took several hours to make the systemthree.com instance of viewcategories.asp do what it does today.  That's with us knowing flat out how the whole thing ties together.  It was fairly tricky.  Step carefully, but now I think I finally have reached you.  No custom pages - just custom alterations of stock code.

-------------
GreyBeard Design Group

Certified ProductCart Developer

Web Design/Development/Hosting

http://tinyurl.com/5c8t4t" rel="nofollow - Add-Ons & Custom Code |


Posted By: ITistic
Date Posted: 31-August-2010 at 4:22pm
.. and to add to what everyone else has said: document, document, and document your customizations. You can never document too much and they'll prove invaluable when you have to upgrade in the future :).

-------------
Shawn Berg
Owner / Project Manager
(877) iTISTIC / (877) 484-7842
http://www.iTistic.com">


Posted By: Brett
Date Posted: 31-August-2010 at 4:57pm
I must be confused. You want to show every field on every page whenever you want, and you think this should be built in? Good luck ;)

Honestly though, you could just write a script that takes a product I'D and field name and pulls those values from the database and returns them via a function.

This is what I would recommend. For the record, I don't think ANY ecommerce software let's you just pull database values whenever you want and insert them to any page you want.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net