More Info Page Prices

Questions and answers about ShopSite Custom Templates

More Info Page Prices

Postby Kapitol » Mon Jan 27, 2014 8:46 am

On More Info Pages with Sub Products; we have sub products and their price being listed. Later we also have the regular price being shown, which shows $0.00

That is not correct. It should only show sub products prices when sub products are listed. I imagine when I edited the code I made a mistake. Can someone help me troubleshoot it?

Code: Select all
[-- IF PRODUCT.MoreInformationGraphic --]
  <span class="col-md-5">[-- MoreInfoImageRow --]</span>
[-- END_IF --]
<div class="col-md-7 product-info">
[-- IF PRODUCT.DisplayName --]
  [-- IF PRODUCT.Subproduct --]
#h2 Title     
  [-- ELSE_IF PRODUCT.VariablePrice? --]
    [-- IF PRODUCT.VariableName? --]
      [-- STORE.ProductName --]: <input type="text" name="[-- PRODUCT.RecordNumber --]:name" size="20" maxlength="100" value="">
    [-- ELSE --]
#h2 Title       
    [-- END_IF --]
  [-- ELSE --]
#h2 Title   
  [-- END_IF --]
[-- END_IF --]

[-- IF PRODUCT.Subproduct --]
# don't display the SKU
[-- ELSE --]
  [-- INCLUDE Product-Sku PROCESS --]
[-- END_IF --]

[-- PRODUCT.MoreInformationText --]

[-- IF PRODUCT.Subproduct --]
# Product has subproducts
  [--LOOP SUBPRODUCTS--]
    <ul class="subs">[--SUBPRODUCTS--]</ul>
  [--END_LOOP SUBPRODUCTS--]
[-- ELSE --]
# Product does not have subproducts
[-- END_IF --]
[-- IF PRODUCT.QuantityPricing --]
#do nothing
[-- ELSE --]
  [-- INCLUDE Product-Price PROCESS --]
[-- END_IF --]
#######################
#  ADD TO CART BUTTON #
#######################
<form action="[-- SHOPPING_CART_URL BASE --]/order.cgi" method="post">
[-- INCLUDE Product-AddToCartButton PROCESS --]
</form>


Link to one of the pages. http://www.artandsoulbeads.com/store/product1950.html
Kapitol
 
Posts: 52
Joined: Mon May 14, 2012 10:26 pm

Re: More Info Page Prices

Postby ShopSite Lauren » Mon Jan 27, 2014 9:18 am

See code below.

Note that in your current code, the add to cart form is not around the subproducts, and the quantity field isn't tied to the subproducts (essentially, you can't add the subproducts to the cart currently). The code below fixes those issues; so you will notice there is no quantity field in addition to removing the price field.

Code: Select all
    [-- IF PRODUCT.MoreInformationGraphic --]<span class="col-md-5">[-- MoreInfoImageRow --]</span>[-- END_IF --]
    <div class="col-md-7 product-info">
    [-- IF PRODUCT.DisplayName --]
      [-- IF PRODUCT.Subproduct --] 
      [-- ELSE_IF PRODUCT.VariablePrice? --]
        [-- IF PRODUCT.VariableName? --]
          [-- STORE.ProductName --]: <input type="text" name="[-- PRODUCT.RecordNumber --]:name" size="20" maxlength="100" value="">   
        [-- END_IF --]
      [-- END_IF --]
    [-- END_IF --]

    [-- IF PRODUCT.Subproduct --][-- ELSE --][-- INCLUDE Product-Sku PROCESS --][-- END_IF --]

    [-- PRODUCT.MoreInformationText --]

    [-- IF PRODUCT.Subproduct --]
    <form action="[-- SHOPPING_CART_URL BASE --]/order.cgi" method="post"><input type="hidden" name="storeid" value="[-- STORE.ID --]"><input type="hidden" name="dbname" value="products"><input type="hidden" name="function" value="add">
      [--LOOP SUBPRODUCTS--]
        <ul class="subs">[--SUBPRODUCTS--]</ul>
      [--END_LOOP SUBPRODUCTS--]
    <br><input class="add" type="submit" value="Add to Cart">
    </form>
    [-- ELSE --]
    [-- IF PRODUCT.QuantityPricing --][-- ELSE --][-- INCLUDE Product-Price PROCESS --][-- END_IF --]
    <form action="[-- SHOPPING_CART_URL BASE --]/order.cgi" method="post">[-- INCLUDE Product-AddToCartButton PROCESS --]</form>
    [-- END_IF --]
- ShopSite Lauren
Contact me for help with any of your
custom ShopSite template questions.
ShopSite Lauren
 
Posts: 887
Joined: Fri Aug 11, 2006 1:35 pm
Location: Orem, UT

Re: More Info Page Prices

Postby Kapitol » Mon Jan 27, 2014 9:48 am

Thank you Lauren
Kapitol
 
Posts: 52
Joined: Mon May 14, 2012 10:26 pm


Return to Custom Template Questions

Who is online

Users browsing this forum: No registered users and 14 guests

cron