Jump to content

[Resolved] Featured Product Relocates to Footer


Recommended Posts

I think I'm going crazy! Made a minor change to the content.product.php of the foundation templet, (removed the </div> </div> on line 137 & 138) no other code was changed. This was done to bring my product description up below the Add to Basket button. Description moved up as expected, cart works fine. However, now my featured product and all other items that were in the right column have moved and now live in left side of the footer. Right column space appears to still be there, however it is blank. There does not appear to be anything concerning the right column on this page. I sure could use some help! Here is a link showing what happens http://www.sports-collectibles.net/catalog/2002-hot-wheels-daytona-set-up-john-andretti-1/64.html

 

Link to comment
Share on other sites

Welcome Neatthings! Glad to see you made it to the forums.

Picture in your mind those Russian dolls where a small one fits inside a slightly bigger one, which then fits inside a slightly bigger one, which then fits inside a slightly bigger one, etc, etc. Now, cut the bottoms out of the largest two dolls (<div> containers). There will be a mess on the floor.

Please restore the bottoms to the <div> containers (and whatever else you changed). We will try to find some other approach to get the display you are after.

Link to comment
Share on other sites

Thanks for your reply! Just a little more info, I tried copying and moving lines 139 - 215 up to line 87 (above the add to cart button) The descriptions moved, the right column was there and the page looked good. However after doing that, the add to cart button did not work. I got away with making this change on a competitors cart used on one of my other sites. I even tried taking one </div>  (line 139) out, the page turned black. Everything is back to normal and waiting on your input. Thank you for your help!

Link to comment
Share on other sites

Let's take this just a small step at a time.

Let's move the Product Description to be on the right side of the image. To do this, the Product Description is currently part of a set of <div> blocks that make their appearance as a tabbed collection of panels. If we move the Product Description, and only the Product Description out of this set, we also need to remove the tab.

So, starting near line 140:

Find:
         {if !empty($PRODUCT.description)}
         <dd class="active"><a href="#product_info">{$LANG.catalogue.product_info}</a></dd>
         {/if}

Change to:
{*
         {if !empty($PRODUCT.description)}
         <dd class="active"><a href="#product_info">{$LANG.catalogue.product_info}</a></dd>
         {/if}
*}

This causes Smarty, the template rendering engine, to treat what's inside the brace-asterisk as a template comment and will not appear in the output.

Next, near line 150:

Find:
         {if !empty($PRODUCT.description)}
         <div class="content active" id="product_info" itemprop="description">
            {$PRODUCT.description}
         </div>
         {/if}

Change to:
{*
         {if !empty($PRODUCT.description)}
         <div class="content active" id="product_info" itemprop="description">
            {$PRODUCT.description}
         </div>
         {/if}
*}

Again, we made this a comment so that it won't show in the output.

However, let's put a copy at the top. Near line 32:

Find:
            {if is_array($OPTIONS)}
            {foreach from=$OPTIONS item=option}

Add ABOVE:
         {if !empty($PRODUCT.description)}
         <div id="product_info" itemprop="description">
            {$PRODUCT.description}
         </div>
         {/if}

We removed the class="content active" from the <div> attributes because its no longer part of the tabbed content.

Finally, near line 155:

Find:
<div class="content{if empty($PRODUCT.description)} active{/if}" id="product_spec">

Change to:
<div class="content" id="product_spec">

This makes this tab active instead of active only if there was no description.

Try that and we will make more adjustments later.

Link to comment
Share on other sites

THAT DID IT! - It put the description above the "Add to Basket" button where I really need it to be. With the description at this location, the customer can't say they didn't see the product disclaimers before they hit the buy button. The specification tab is still showing below everything else, don't really need it, all important info can be added to the descriptions. I should be able to tell it not to display this. Before I do, is there any reason I shouldn't disable it? I can't thank you enough! You've been a great help!

Link to comment
Share on other sites

  • 1 year later...

Hi, about a year ago BSmither was a great help in resolving an issue with relocating the product description on a page. It has worked great until I tried using the latest version (6.0.9) of Cubecart for a new site. Followed step-by-step to move product description as was done in the past. No product description will display. http://www.picturesin3d.com/test-product.html. Changed it back to original 5 times, works fine, just will not put anything above the add to cart button. Any suggestions?

 

 

Link to comment
Share on other sites

I'm not seeing any textual material that serves as a product's description.

Usually, next to the Specification tab is where the Product Information tab resides, with the Description in a panel beneath it.

 

I just made the same edits in my installation of Foundation that ships with CC6012. No problems. Different line numbers, perhaps.

 

Link to comment
Share on other sites

(Hope code don't mess-up forum)Tab goes away when I change line 141 (now 147) as described above. Description goes away when I change line 152 (now 158) FYI lines moved when I added line 32  {if is_array($OPTIONS)}

{if !empty($PRODUCTS.description
)}
<div id="product_info" itemprop="description">
{$PRODUCT.description}
</div>
{/if}
            {if is_array($OPTIONS)}

code below starts at 147

{* 
         {if !empty($PRODUCT.description)}
         <dd class="active"><a href="#product_info">{$LANG.catalogue.product_info}</a></dd>
         {/if}
*}
         <dd><a href="#product_spec">{$LANG.common.specification}</a></dd>
         {if isset($PRODUCT.discounts)}
         <dd><a href="#quantity_discounts">{$LANG.catalogue.quantity_discounts}</a></dd>   
         {/if}
      </dl>
      <div class="tabs-content">
{*
         {if !empty($PRODUCT.description)}
         <div class="content active" id="product_info" itemprop="description">
            {$PRODUCT.description}
         </div>
         {/if}
*}
         <div class="content" id="product_spec">

Link to comment
Share on other sites

Let's look at the code. Compared to the above, there are just a few minor differences::

{if !empty($PRODUCTS.description)}
<div id="product_info" itemprop="description">
{$PRODUCT.description}
</div>
{/if}
            {if is_array($OPTIONS)}

code below starts at 147

{* 
         {if !empty($PRODUCT.description)}
         <dd class="active"><a href="#product_info">{$LANG.catalogue.product_info}</a></dd>
         {/if}
*}
         <dd class="active"><a href="#product_spec">{$LANG.common.specification}</a></dd>
         {if isset($PRODUCT.discounts)}
         <dd><a href="#quantity_discounts">{$LANG.catalogue.quantity_discounts}</a></dd>   
         {/if}
      </dl>
      <div class="tabs-content">
{*
         {if !empty($PRODUCT.description)}
         <div class="content active" id="product_info" itemprop="description">
            {$PRODUCT.description}
         </div>
         {/if}
*}
         <div class="content active" id="product_spec">

Of your code above, the first changed line, now at line 31, has the closing parenthesis and brace on a different line. See my first line above where these characters are all in one line.

Other minor changes have added active to the class= in two spots.

Link to comment
Share on other sites

Currently:
{if !empty($PRODUCTS.description)}

Needs to be:
{if !empty($PRODUCT.description)}

I would like for you to examine the code at line 31, which I also failed to notice. The name of the variable is not correct.

 

 

Link to comment
Share on other sites

What a dumb mistake, that fixed it, something simple & stupid. I spent several hours on this last night. I would have never seen this if it wasn't for your keen eye. I bet I had looked at this line at least 100 times last night before submitting to the forum last night. Never had this problem before, When an update came out, I'd update, then change the coding for the logo and product pages, remove the specification tab and everything would work the way it should. Automatically thought there may have been a flaw or coding change in the update. Sorry to waste your time for such a stupid mistake. I want to thank you for sharing your expertize with the forum. I find your name on many issues that have been resolved when searching the Cubecart forum. You are a valuable asset to the forum. Again, thanks for your help!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...