devshb
Senior Member
United Kingdom
1904 Posts |
Posted - April 05 2010 : 22:03:59
|
We tried doing something similar to this a few months ago on a 6.5 site, and from what I can gather (although I might be wrong) I think v7 has the same difficulty/solution in how you'd go about doing it.
What we needed to do was to display a given set of products on a content page, with those product details being retrieved dynamically when you loaded the content page. For example, you have a "new line of plasma tvs now out" content page, and you want to display that list of products within the content page in a similar format to how the frontpage sections look etc. We also needed that list to be dynamic too (so that new products added to that category get added to the content page automatically without you having to alter/regenerate the content page/data).
In the end the way we did it was to create a new template-field for "display products using this where clause...", got that template-field to call our product-showcase function (byz093), added the template field to the content template, and then specified the where clause on the content record.
That exact solution will only work if you want to show the product info above or below your content's main-html though (although it may be possible to add the template-field within the actual content html; i'm unsure if vpasp will process things in a secondary way if doing that, it may well do). If the product info needs to be within the main content html itself (ie not above/below it), and if vpasp v7 can't handle/process template-fields within a template-field that's already being processed, then you could get round it by creating yet another template-field specifically for content which gets the content html, looks for a reserved string which is similar to a template-field format, and then decodes your reserved string into the relevant call.
If you only need to show the products above/below the main content html then byz093 is what you're after and will work as-is (you'd just install it, and then read/do the "Usage Instructions (Calling Products ShowCase Functions from Templates, eg in content pages) :" readme file which explains what to do)
Whether you're trying to just get/show the price for a single product, or to show multiple products with lots of details, the same kind of problem/solution would apply.
It's all possible to do with a bit of addon/tweaking etc, but as far as I know it's not something that you can easily do. Having the logic mentioned above is a bit of a pain to initially setup, but once you've got all the code in place to do it you can then show any products you want on any content page you want in any format, and have all that done dynamically at browse-time (our where clauses that we stamped onto content records were category where clauses, ie to show all products within a given category, but if using this logic you could use any where clause you want).
See also: BYZ093 - Product ShowCase (Enhanced Front-Page) Functions for VP-ASP: http://www.bigyellowkey.com/mysoftware_product_details.asp?prdid=222&opu=n (which is now vpaspv7 compatible, and also compatible with 4.5 to 6.5)
Simon Barnaby Developer [email protected] www.BigYellowZone.com www.BigYellowKey.com Follow us on Twitter: http://twitter.com/bigyellowzone Web Design, Online Marketing and VPASP addons |
Edited by - devshb on April 05 2010 22:12:52 |
|
|
mikeach
Starting Member
USA
40 Posts |
Posted - April 12 2010 : 12:23:11
|
Seems like a LOT of work to just be able to pull the price of a product from the DB. I've worked with other carts in the past and this was a fairly simple thing to do. We're currently converting from another cart to VPASP v7, in the old cart we just put <%= FormatCurrency(getProductInfo("br4184625", 8))%> and it pulled the current price right from the DB, isn't there some code that can just do this? We don't use a currency converter so I would think that would make it easier. |
|
|