Announcement

Collapse
No announcement yet.

Show regular price and sale price on listing page

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Show regular price and sale price on listing page

    Just noticed that on the category page where the products are shown both the regular price and the sale price are shown. it looks good. But when the item is clicked on to go to the listing page the only price shown is the sale price. How can the regular price be shown like in the category page?

  • #2
    First thing to check is to make sure that your listing template has all of the pricing tags if the template has been modified (the primary pricing tags should be as below within the pricing block tag):

    Code:
    <!--START: ITEMPRICE-->
    <div class="yourprice price">[product_yourprice]<span itemprop="price" id="price">[price]</span></div>
    <!--END: ITEMPRICE-->
    <!--START: SALEPRICE-->
    <div class="saleprice price">[product_onsale]<span itemprop="price" id="price">[saleprice]</span></div>
    <!--END: SALEPRICE-->
    <!--START: price2-->
    <div class="retailprice">[product_retailprice]<span>[price2]</span></div>
    <!--START: SAVINGS-->
    <div class="savings">[product_savings]<span>[savings]</span><span>([savings_percentage]%)</span></div>
    <!--END: SAVINGS-->
    <!--END: price2-->
    TheCartDesigner.com
    Not 3dcart Owned or Operated
    100% Independent 3dcart Expert


    Follow Us on Twitter

    Comment


    • #3
      Shaun you were burning the midnight oil on this one :-) I'm going to subscribe to this thread

      Comment


      • #4
        Thanks Shaun, seems I picked a very incomplete theme to work with from 3dcart.

        I tried your code but it doesn't show the regular price.

        Here is what the original is:

        <h3 class="hidden">[product_Header-price]</h3>
        <div class="clear"></div>
        <div class="yourprice price">
        [product_yourprice]
        <!--START: ITEMPRICE-->
        <span itemprop="price" id="price">[price]</span>
        <!--END: ITEMPRICE-->
        </div>
        <!--START: SALEPRICE-->
        <div class="saleprice price">[product_onsale]<span itemprop="price" id="price">[saleprice]</span></div>
        <!--END: SALEPRICE-->
        <!--START: price2-->
        <div class="retailprice">[product_retailprice]<span>[price2]</span></div>
        <!--START: SAVINGS-->
        <div class="savings">[product_savings]<span>[savings]</span><span>([savings_percentage]%)</span></div>
        <!--END: SAVINGS-->
        <!--END: price2-->


        The original code above makes the words "Your Price" but no original price shows and this appears above the Sale Price.
        I changed it to the code you gave and then the words "Your Price" disappeared on the web page and no regular price appeared. I just copied and pasted your code in place of the code in blue above.

        I had not modified this template prior to asking the question. I have reverted back to the original version of the template for now.

        Thanks,
        Ken

        Comment


        • #5
          I am wondering if there is something else missing or otherwise in your template.. I loaded the same theme on one of my demo sites and it all displays as it should. I am going to send you the newest unmodified listing template and then if you can load that up, clear store cache, and refresh to see if it has anything to do with the listing template at all or if there is something else keeping it form working.
          TheCartDesigner.com
          Not 3dcart Owned or Operated
          100% Independent 3dcart Expert


          Follow Us on Twitter

          Comment


          • #6
            I believe the product page pulls the "Retail Price" whereas category pages pull the "Price" to strike-through.
            Webmaster: Texas Media Systems

            Comment


            • #7
              TMS Clint You are correct, although that is very easily changed to match in the listing template by changing [price2] to simply [price]. 3dcart-Henry Now along those lines I just noticed a fatal flaw with the listing page pricing layout direct from 3dcart.

              See in red: These cannot be the same id. The same itemprop is fine. But having the same id for both itemprice and saleprice will render the regular price as the sale price. The sale price id should be different, like id="pricesale". This is very important and should be an urgent fix because it will not render the correct sale price on the listing page to users customers

              Code:
               <!--START: pricing-->
                          <div class="pricingBlock" itemprop="offers" itemscope itemtype="http://schema.org/Offer">
                              <meta itemprop="itemCondition" itemtype="http://schema.org/OfferItemCondition" content="http://schema.org/NewCondition" />
                              <meta itemprop="availability" href="http://schema.org/[availability_snippet]" />
                              <h3 class="hidden">[product_Header-price]</h3>
                              <div class="clear"></div>
                              <div class="yourprice price">
                                  [product_yourprice]
                                  <!--START: ITEMPRICE-->
                                  <span itemprop="price" id="price">[price]</span>
                                  <!--END: ITEMPRICE-->
                              </div>
                              <!--START: SALEPRICE-->
                              <div class="saleprice price">[product_onsale]<span itemprop="price" id="price">[saleprice]</span></div>
                              <!--END: SALEPRICE-->
                              <!--START: price2-->
                              <div class="retailprice">[product_retailprice]<span>[price2]</span></div>
                              <!--START: SAVINGS-->
                              <div class="savings">[product_savings]<span>[savings]</span><span>([savings_percentage]%)</span></div>
                              <!--END: SAVINGS-->
                              <!--END: price2-->
                              <div class="clear"></div>
                          </div>
                          <!--END: pricing-->
              TheCartDesigner.com
              Not 3dcart Owned or Operated
              100% Independent 3dcart Expert


              Follow Us on Twitter

              Comment


              • #8
                Thank you all for your help with this.

                I did find that the 'regular' price I was looking for is:

                On the Product listing page > The products "Retail Price" which displays below the sale price and really doesn't make sense to have it there.

                On the Category listing page > The products "Price"

                First, this doesn't make sense. Why do we need to have redundant information on the product? I have over 900 products without a Retail Price because the old templates use the Price field. It is a waste of time to have two fields with the exact same information. I need a solution that will use only the Price field. I can't see that going through all my products to add the amount in the Price field to the Retail Price field is worth doing when I should be able to fix this issue by just getting the listing_0.html page to use the Price field just as the category_0.html does.

                Second, In the code on the listing page the first occurrence of this line <span itemprop="price" id="price">[price]</span> does nothing. Two lines above this displays the words "Your Price" but the space next to it is blank on the webpage. This seems a waste of coding and bandwidth. Every time someone loads a product page this piece of code has to be read and processed which is a waste since nothing is done with the code. Am I right?

                Comment


                • #9
                  watchdr The "Your Price" is not placed properly direct from the original listing template. The code that I posted earlier corrects that because Your Price is useless on its own when there is a sale price listed.

                  For the listing page to show "Price" instead of "Retail Price" like the category, just change the [price2] to [price] on the div class="retailprice" line.
                  TheCartDesigner.com
                  Not 3dcart Owned or Operated
                  100% Independent 3dcart Expert


                  Follow Us on Twitter

                  Comment

                  Working...
                  X