X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   common if/then modifications I make to x-cart... (https://forum.x-cart.com/showthread.php?t=8881)

Jon 12-16-2013 10:17 AM

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}


EnterWorld 02-28-2014 04:08 PM

Re: common if/then modifications I make to x-cart...
 
Is there a if statement for:

if product is in category ... than ...

cflsystems 02-28-2014 05:36 PM

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.

EnterWorld 03-01-2014 03:00 PM

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?

cflsystems 03-01-2014 08:55 PM

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

Natures Elements 04-30-2014 03:41 PM

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.

totaltec 05-01-2014 09:03 AM

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.

xtech 10-06-2014 12:22 AM

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?

anandat 12-24-2016 07:26 AM

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 ?


All times are GMT -8. The time now is 05:07 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.