Results 1 to 10 of 10
  1. #1
    Join Date
    Oct 2010
    Posts
    50
    Plugin Contributions
    0

    Default Showing product price in EZ-Pages?

    I'm looking for suggestions as to the best way forward.
    zen cart v1.5.1

    Within an EZ-Page I show images of selected products by using <img src="image location" and I then add a "buy now" button (with product description) below the image. All of this is enclosed within,

    <a href="product info page url"> . . . . </a>

    which identifies the product uniquely.

    An example from the web site is shown here,
    http://lotusmoonjewellery.com/gemstone-rings

    This is set up as an ez page showing 5 products identified in the above manner.

    Now as the <a href= ... </a> identifies the product uniquely, one should be able to show other info, pertaining to that same product, on the ez page.

    My question is,
    How can I bring in the "Product Price" for each product so I can include same in the "buy now" button (without forcing customers to go to each product page url in turn) ?

    Any suggestions greatly appreciated :)

    Regards
    Terry

  2. #2
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Showing product price in EZ-Pages?

    Quote Originally Posted by RedSpinnaker View Post
    My question is,
    How can I bring in the "Product Price" for each product so I can include same in the "buy now" button (without forcing customers to go to each product page url in turn) ?

    Code:
    $PP = zen_get_products_display_price($productID) ;
    
    or simply
    echo zen_get_products_display_price($productID) ;

    Cheers
    RodG

  3. #3
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Showing product price in EZ-Pages?

    Well, and just thinking off the cuff here...

    EZ pages are typically database driven/text accessible content. You say that you are including the product description with the product, but is that content copied and pasted into the description or is that being pulled from the database somewhere/somehow?

    My guess, is that it is copied content which also means that if your site was going to use multiple languages there would be a lot to change to accommodate (more than likely), whereas if a coded page was created to do all of this, then the information could be dynamically pulled from the database and displayed like a standard product_info page or other display page, but could use language files and the applicable language assignment for each product as applicable.

    So to your question of price. One thing comes to mind is a sort of javascript database interface (ajax) that would pull the price for the product(s) as designed... That is unless you use a coding strategy that identifies which ez-page is being presented and to feed/obtain the price information for each product as it appears Rod is suggesting (unless I've missed something).

    Lot's of ways to accomplish whatever is needed and if what is working is working, then I don't recommend changing it just for the sake of change. :)
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  4. #4
    Join Date
    Oct 2010
    Posts
    50
    Plugin Contributions
    0

    Default Re: Showing product price in EZ-Pages?

    Quote Originally Posted by RodG View Post
    Code:
    $PP = zen_get_products_display_price($productID) ;
    
    or simply
    echo zen_get_products_display_price($productID) ;

    Cheers
    RodG
    Thanks RodG,

    This sounds very encouraging. I assume the code needs to be within a php script placed in the EZ-Page document.
    Can you please give me some guidance on the layout and placement of the script?

    Cheers
    Terry

  5. #5
    Join Date
    Oct 2010
    Posts
    50
    Plugin Contributions
    0

    Default Re: Showing product price in EZ-Pages?

    Quote Originally Posted by mc12345678 View Post
    Well, and just thinking off the cuff here...

    EZ pages are typically database driven/text accessible content. You say that you are including the product description with the product, but is that content copied and pasted into the description or is that being pulled from the database somewhere/somehow?

    My guess, is that it is copied content which also means that if your site was going to use multiple languages there would be a lot to change to accommodate (more than likely), whereas if a coded page was created to do all of this, then the information could be dynamically pulled from the database and displayed like a standard product_info page or other display page, but could use language files and the applicable language assignment for each product as applicable.

    So to your question of price. One thing comes to mind is a sort of javascript database interface (ajax) that would pull the price for the product(s) as designed... That is unless you use a coding strategy that identifies which ez-page is being presented and to feed/obtain the price information for each product as it appears Rod is suggesting (unless I've missed something).

    Lot's of ways to accomplish whatever is needed and if what is working is working, then I don't recommend changing it just for the sake of change. :)

    Hi mc and thanks for your comments.
    The usage I have in mind is quite restricted in that,
    1. these pages are "introductory" in that they lead directly to product or catalog pages.
    1. there are relatively few such pages required.
    2. those pages will remain for a long period without update, save for price changes.
    3. language is English only

    Rod's coding approach makes sense as in setting up the page one needs to insert the product info page url separately for each product being featured anyway, and so one can also code in the appropriate product ID at the same time.
    I can certainly see and would be the first to appreciate the value of coded information pulled dynamically from the database as you describe in instances where multi languages or extensive use of the technique would make it desirable.

    Cheers
    Terry

  6. #6
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Showing product price in EZ-Pages?

    Got to rethinking applying rod's suggestion in a "straight forward" manner by trying to use php code in the content of an ez page. (Ie, not having an internal or external redirect and not an image.)

    So I populated the end of the description with code like:
    Code:
    <?php echo "Hello"; ?>
    Saved it and then viewed it as a customer... The text Hello was not presented onscreen, but it was present in the source code in it's entirety. This only further validated my first recollection, that the content of the ez page is simply that, content. It is not preprocessed to be handled as php. This leads me back to if the page remains content based (not a redirect to elsewhere) then the applicable page template file(s) would probably be the "best" place to incorporate the above suggested code.

    Mind you, the need for a single language doesn't mean other methods of presentation can't be used or that multiple languages have to be used on the other page(s), and the fact that the product is to remain pretty consistent, it all could be instead placed in a define page (which does get parsed for php content) or an individual page can be created similar to index.php?main_page=new_page_made

    Also there is a plugin that offers multi-language ez pages, the thing in my opinion depends on what all is being displayed, ease of changing (remembering), how it is to be used, likelihood of impact on upgrade, how soon it's needed, impact on sales if not immediately implemented, etc...

    Anyways, was just some more ideas and discussion. Application can be made any number of ways... I'm not at a computer to easily chase down the file(s) in which the above echo statement(s) would best be suited and not as famliar with that fileset to provide specifics.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  7. #7
    Join Date
    Oct 2010
    Posts
    50
    Plugin Contributions
    0

    Default Re: Showing product price in EZ-Pages?

    Quote Originally Posted by mc12345678 View Post
    Got to rethinking applying rod's suggestion in a "straight forward" manner by trying to use php code in the content of an ez page. (Ie, not having an internal or external redirect and not an image.)

    So I populated the end of the description with code like:
    Code:
    <?php echo "Hello"; ?>
    Saved it and then viewed it as a customer... The text Hello was not presented onscreen, but it was present in the source code in it's entirety. This only further validated my first recollection, that the content of the ez page is simply that, content. It is not preprocessed to be handled as php.
    Yes I had the same result playing with the php code, which lead me to ask Rod for the further input.
    On the other hand I have some success incorporating twitter bootstrap within ez pages in order to render content 'mobile friendly' - which leads me to suspect ez pages is not quite so *unfeeling as one might believe

    Terry

  8. #8
    Join Date
    Oct 2010
    Posts
    50
    Plugin Contributions
    0

    Default Re: Showing product price in EZ-Pages?

    Quote Originally Posted by mc12345678 View Post
    Got to rethinking applying rod's suggestion in a "straight forward" manner by trying to use php code in the content of an ez page. (Ie, not having an internal or external redirect and not an image.)

    So I populated the end of the description with code like:
    Code:
    <?php echo "Hello"; ?>
    Saved it and then viewed it as a customer... The text Hello was not presented onscreen, but it was present in the source code in it's entirety. This only further validated my first recollection, that the content of the ez page is simply that, content. It is not preprocessed to be handled as php. This leads me back to if the page remains content based (not a redirect to elsewhere) then the applicable page template file(s) would probably be the "best" place to incorporate the above suggested code.

    Mind you, the need for a single language doesn't mean other methods of presentation can't be used or that multiple languages have to be used on the other page(s), and the fact that the product is to remain pretty consistent, it all could be instead placed in a define page (which does get parsed for php content) or an individual page can be created similar to index.php?main_page=new_page_made

    Also there is a plugin that offers multi-language ez pages, the thing in my opinion depends on what all is being displayed, ease of changing (remembering), how it is to be used, likelihood of impact on upgrade, how soon it's needed, impact on sales if not immediately implemented, etc...

    Anyways, was just some more ideas and discussion. Application can be made any number of ways... I'm not at a computer to easily chase down the file(s) in which the above echo statement(s) would best be suited and not as famliar with that fileset to provide specifics.
    Anymore thoughts along these lines .. anyone?
    Cheers
    Terry

  9. #9
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Showing product price in EZ-Pages?

    Quote Originally Posted by RedSpinnaker View Post
    Anymore thoughts along these lines .. anyone?
    Cheers
    Terry
    https://www.zen-cart.com/showthread....648#post209648

    Cheers
    RodG

  10. #10
    Join Date
    Oct 2010
    Posts
    50
    Plugin Contributions
    0

    Default Re: Showing product price in EZ-Pages?

    Quote Originally Posted by RodG View Post
    Thanks RodG,
    That's perfect :)
    http://lotusmoonjewellery.com/Gemstone-rings

    Cheers
    Terry

 

 

Similar Threads

  1. Product listed as "Call for Price," and still showing price
    By jdw1979 in forum Setting Up Categories, Products, Attributes
    Replies: 10
    Last Post: 27 May 2014, 11:06 PM
  2. how to make right column not showing at product page, and other pages showing?
    By win8win in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 25 May 2012, 10:49 AM
  3. v150 Trouble with product images - showing up weird on product listing pages.
    By schapirate in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 27 Apr 2012, 06:25 PM
  4. Product Price not showing
    By RiverCity in forum Basic Configuration
    Replies: 11
    Last Post: 22 Nov 2010, 04:58 PM
  5. Product Price showing wrong
    By Sunabac in forum General Questions
    Replies: 3
    Last Post: 24 Feb 2007, 06:57 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR