Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

common if/then modifications I make to x-cart...
 
Reply
   X-Cart forums > X-Cart 4 > Changing design
 
Thread Tools Search this Thread
  #171  
Old 12-16-2013, 10:17 AM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,174
 

Default Re: common if/then modifications I make to x-cart...

Code:
{if $main eq "catalog" AND $current_category.categoryid ne "" AND $products ne ""} {include file="modules/Refine_Filters/customer_filter.tpl"} {/if}
__________________
|
Our clients strive to be the best in their industry.
We position you for success with our strategically integrated approach to software, search engine optimization and social media.

E-COMMERCE FUTURE
https://www.stackdigital.com

LINKEDIN
https://www.linkedin.com/in/smackdigital
Reply With Quote

The following user thanks Jon for this useful post:
totaltec (12-18-2013)
  #172  
Old 02-28-2014, 04:08 PM
 
EnterWorld EnterWorld is offline
 

Newbie
  
Join Date: Jun 2009
Posts: 9
 

Default Re: common if/then modifications I make to x-cart...

Is there a if statement for:

if product is in category ... than ...
__________________
X cart Gold 4.6.2
Reply With Quote
  #173  
Old 02-28-2014, 05:36 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 13,602
 

Default Re: common if/then modifications I make to x-cart...

{if $product.categoryid eq 'XX'}...{/if}

Keep in mind though this is the main category the product is so if you have it assigned to more than one category it will not work for the additional categories. If you need it to work everywhere product shows it has to be custom coded.
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #174  
Old 03-01-2014, 03:00 PM
 
EnterWorld EnterWorld is offline
 

Newbie
  
Join Date: Jun 2009
Posts: 9
 

Default Re: common if/then modifications I make to x-cart...

Thank you for the fast answer. But it doesn't work.

Do i also need to edit some php file to make that code work on the category page of my shop?
__________________
X cart Gold 4.6.2
Reply With Quote
  #175  
Old 03-01-2014, 08:55 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 13,602
 

Default Re: common if/then modifications I make to x-cart...

Look in the debug console if categoryid even exists for the products array, you can use the webmaster mode to show the debug console
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #176  
Old 04-30-2014, 03:41 PM
 
Natures Elements Natures Elements is offline
 

Member
  
Join Date: Aug 2009
Location: Lindenhurst, NY
Posts: 19
 

Default Re: common if/then modifications I make to x-cart...

I am interested in the if/then modification #10. I need to do something similar. Is it possible to have a payment method not show up if a certain product option is selected? More specifically I have a product option called 'auto-ship' that if if is selected as 'No' I want the customer to have PayPal checkout as an option, however if they choose 'Yes' for this product option I do not want the PayPal option to be available during checkout. Any information/ advise would be very helpful and appreciated. Thank you.
__________________
--
Thank you,
Michelle
Natures Elements, Inc.
http:www.natureselements.net
X-cart Version: 4.2
Reply With Quote
  #177  
Old 05-01-2014, 09:03 AM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: common if/then modifications I make to x-cart...

Quote:
Originally Posted by Natures Elements
I am interested in the if/then modification #10. I need to do something similar. Is it possible to have a payment method not show up if a certain product option is selected? More specifically I have a product option called 'auto-ship' that if if is selected as 'No' I want the customer to have PayPal checkout as an option, however if they choose 'Yes' for this product option I do not want the PayPal option to be available during checkout. Any information/ advise would be very helpful and appreciated. Thank you.
Its probably going to take some PHP work, you need to loop through all the products in the cart looking for this option, then if found assign a variable that you can use in the template to formulate your if statement.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote
  #178  
Old 10-06-2014, 12:22 AM
 
xtech xtech is offline
 

X-Adept
  
Join Date: Jun 2010
Posts: 605
 

Default Re: common if/then modifications I make to x-cart...

Quote:
Originally Posted by totaltec
Look near line 1274 of include/register.php
Code:
// Redirect just registered customer if ($isAutoLogin) { $script = 'address_book.php'; } else { $script = 'home.php'; }

How to achieve this?

If any customer directly register in the cart by clicking register.php without adding product in the cart will redirect to home page and if any customer added product in the cart and then click register.php then how to redirected that customer to address book page?
__________________
X-cart Platinum
4.6.1
Reboot template
Reply With Quote
  #179  
Old 12-24-2016, 07:26 AM
 
anandat anandat is offline
 

X-Adept
  
Join Date: Jan 2004
Posts: 912
 

Exclamation Re: common if/then modifications I make to x-cart...

I want to display extra field #6 (name = publisher) in admin email invoice. I tried adding following code in skin\common_files\mail\html\order_data.tpl
PHP Code:
{if $show_order_details eq 'Y'}<span> - {$product.extra_fields|$product.Publisher} {/if} 
But that doesn't display value of extra field id 6 (Publisher).

Does any one know how to achieve this ?
__________________
X-Cart: 4.7.7 LIVE
Skin:Ultra by xcartmods.co.uk
X-cart Modules: | ACR, Rich Google Search, Customer Testimonials | Cloud Search, | Websitecm: CDSEO (2.1.9)
---------------
Server: Linux
php: 5.3
mysql: 5.0.89
----------------
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 11:57 PM.

   

 
X-Cart forums © 2001-2018