| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
conditional left column | ||||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
conditional left column
I am in very quick need to make the product details page left column conditional. To be more specific, I want the left column to disappear on the details page. What I have done so far was to try to create a conditional based upon the url. When it did not work, I moved the if around to try to simplify the task for testing. I am still not able t achieve what I am after. Here is my code. Does anyone see anything obvious?
I have tried the following using both smarty and php, to no avail. Seriously big kudos and karma points to anyone that can help! {* show the url for a baseline *} {$canonical_url} {* Test conditional remove on product details page *} {php} if (substr ($canonical_url, "product.php?productid=") !== false ) { "show sidebar" } {/php} <div class="menu-dialog{if $additional_class} {$additional_class}{/if}"> <div class="title-bar valign-middle{if $link_href} link-title{/if}"> {strip} {if $link_href} <span class="title-link"> <a href="{$link_href}" class="title-link"><img src="{$ImagesDir}/spacer.gif" alt="" /></a> </span> {/if} <img class="icon ajax-minicart-icon" src="{$ImagesDir}/spacer.gif" alt="" /> <h2>{$title}</h2> {/strip} </div> <div class="content"> {$content} </div> </div>
__________________
X-Cart Pro 4.1.10, 4.3.1, 4.2.x, 4.3, 4.4.3, 4.5.5, Platinum 4.6 Add-on: X-Affiliate Fashion Mosaic Add-on: X-SpecialOffers Add-on: X-GiftRegistry Add-on: X-AOM (Advanced Order Management) Add-on: X-FancyCategories Add-on: Custom Multi-currency |
|||||||
#2
|
|||||||
|
|||||||
Re: conditional left column
First: Don't use PHP in smarty templates. It's a template engine so any actual 'work' should be done outside.
Second: Your signature shows 4.1 so it should be in that category and not 4.2/4.3 Third: Try something like this: Code:
|
|||||||
|
#3
|
|||||||
|
|||||||
Re: conditional left column
Sorry, my signature is way out of date. This is a 4.3.1 installation.
__________________
X-Cart Pro 4.1.10, 4.3.1, 4.2.x, 4.3, 4.4.3, 4.5.5, Platinum 4.6 Add-on: X-Affiliate Fashion Mosaic Add-on: X-SpecialOffers Add-on: X-GiftRegistry Add-on: X-AOM (Advanced Order Management) Add-on: X-FancyCategories Add-on: Custom Multi-currency |
|||||||
#4
|
|||||||
|
|||||||
Re: conditional left column
Awesome solution, thank you so much!
__________________
X-Cart Pro 4.1.10, 4.3.1, 4.2.x, 4.3, 4.4.3, 4.5.5, Platinum 4.6 Add-on: X-Affiliate Fashion Mosaic Add-on: X-SpecialOffers Add-on: X-GiftRegistry Add-on: X-AOM (Advanced Order Management) Add-on: X-FancyCategories Add-on: Custom Multi-currency |
|||||||
#5
|
|||||||||
|
|||||||||
Re: conditional left column
Thats exactly what I needed, thank you very much. Where to put this code in product.tpl? And also is there a way to push the product details all the way to the left, so I can use the free space for larger product image?
__________________
Version 4.2.3 X-Cart Gold Version 4.3.1 X-Cart Gold |
|||||||||
#6
|
|||||||
|
|||||||
Re: conditional left column
Quote:
To control the left/right nav bar, you need to change the code in the .tpl file its located in... This would/should be skin1/customer/home.tpl As for pushing product details to the left, you could try changing the details div/span css to: Code:
|
|||||||
|
#7
|
|||||||||
|
|||||||||
Re: conditional left column
Thank you very much, Sir!
__________________
Version 4.2.3 X-Cart Gold Version 4.3.1 X-Cart Gold |
|||||||||
#8
|
|||||||||
|
|||||||||
Re: conditional left column
Unfortunatelly moving just the product details box to the left seems to be a problem, cause its included in home_main.tpl, which is included in <div id="center-main">, which is in the center of the website... Do you think there is any way to do this?
__________________
Version 4.2.3 X-Cart Gold Version 4.3.1 X-Cart Gold |
|||||||||
#9
|
|||||||
|
|||||||
Re: conditional left column
By product details, I assume you mean weight, price, SKU and extra fields right?
Those are stored in product.tpl and not home_main.tpl |
|||||||
#10
|
|||||||||
|
|||||||||
Re: conditional left column
No, sir. I mean to move the whole products detail container to the left. Please see attached image.
__________________
Version 4.2.3 X-Cart Gold Version 4.3.1 X-Cart Gold |
|||||||||
|
|||
X-Cart forums © 2001-2020
|