X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Third Party Add-Ons for X-Cart 4 (https://forum.x-cart.com/forumdisplay.php?f=45)
-   -   X-Cart Adapt Template (https://forum.x-cart.com/showthread.php?t=64553)

PhilJ 08-24-2012 02:27 AM

Re: X-Cart Adapt Template
 
Just a heads up, for those exporting their databases from the X-Cart DB backup tool, it is important that you've made this small modification...

In admin/db_backup.php comment out or delete this code...

Code:

            if (!in_array($_table, $sql_tbl))
                continue;


It will then export ALL database tables including custom ones.

Also, if you have a large database, for importing it's a good idea to use Bigdump

floracal 08-29-2012 09:11 AM

Re: X-Cart Adapt Template
 
1 Attachment(s)
Hey Phil,

I like the Adapt Template, still testing though.

Two questions:

1. How can I make the category's "Expand All" the default setting?

2. I also like you OPC but it has a problem working with Iframe for X-Payments.

Thanks

PhilJ 08-29-2012 09:38 AM

Re: X-Cart Adapt Template
 
Quote:

1. How can I make the category's "Expand All" the default setting?


Clear cookies.

skin/adapt/custom/categories.tpl

At the end, insert...

Code:

{if $main eq "catalog" && $cat eq "0"}
{literal}
<script type="text/javascript">
$(document).ready(function(){
    ddaccordion.expandall('accordion_cats');
});
</script>
{/literal}
{/if}



Quote:

2. I also like you OPC but it has a problem working with Iframe for X-Payments.

It's not been tested with xpayments.

Try...

skin/adapt/modules/One_Page_Checkout/opc_summary.tpl

After...

Code:

  <input type="hidden" name="payment_method" id="payment_method" value="{$payment_method|default:$payment_data.payment_method_orig|escape}" />

Insert...

Code:

<div class="clearing"></div>

Or, you can revert back to the default OPC, by deleting or renaming this directory...

skin/adapt/modules/One_Page_Checkout

Pitak 08-29-2012 11:11 PM

Re: X-Cart Adapt Template
 
Phil, you've not answered my support ticket for 5 days now, so I'll post the question here.

In the home page, the "new" and "random" product lists have quantity boxes which are always displayed even though the stock is 0. When a customer fills in the quantity number and press "add to cart", the page just refreshed itself. I want to make it consistent with the rest of the site which displays "Out of stock" if qty=0. This also applies to the related products list in the product detail page.

Also, I'd like the quantity boxes to be pull down menus with only the available quantity in stock as the available option.

Can you help?

PhilJ 08-30-2012 07:23 AM

Re: X-Cart Adapt Template
 
Quote:

In the home page, the "new" and "random" product lists have quantity boxes which are always displayed even though the stock is 0. When a customer fills in the quantity number and press "add to cart", the page just refreshed itself. I want to make it consistent with the rest of the site which displays "Out of stock" if qty=0. This also applies to the related products list in the product detail page.

skin/adapt/custom/home_new_products.tpl
skin/adapt/custom/home_random_products.tpl
skin/adapt/modules/Recommended_Products/recommends.tpl
skin/adapt/modules/Upselling_Products/related_products.tpl

In all files, replace...

Code:

    <form action="cart.php" name="add_{$product.productid}" method="get" class="form-inline" autocomplete="off">
    <input name="mode" type="hidden" value="add" />
    <input name="productid" type="hidden" value="{$product.productid}" />
    <input name="amount" type="text" value="1" class="input-tiny" />
    <button class="btn {$config.Adapt.adapt_buy_now_button}" type="submit">{$lng.lbl_add_to_cart}</button>
    </form>


With...

Code:

    {if $product.avail ne "0"}
    <form action="cart.php" name="add_{$product.productid}" method="get" class="form-inline" autocomplete="off">
    <input name="mode" type="hidden" value="add" />
    <input name="productid" type="hidden" value="{$product.productid}" />
    <input name="amount" type="text" value="1" class="input-tiny" />
    <button class="btn {$config.Adapt.adapt_buy_now_button}" type="submit">{$lng.lbl_add_to_cart}</button>
    </form>
    {else}
    <span class="out-of-stock">{$lng.txt_out_of_stock}</span>
    {/if}


Quote:

Also, I'd like the quantity boxes to be pull down menus with only the available quantity in stock as the available option.

I will look into this, it needs custom coding, you'll have to make do with input qty boxes for now.

Pitak 08-30-2012 08:13 AM

Re: X-Cart Adapt Template
 
Thanks Phil. The problem with input qty boxes is that if the input qty is larger than the available in stock, the page will refresh itself. Not good when you're low in stock (like 1 item).

Another issue that I have is: in the submit a testimonial page, the image code does not appear. I'm not sure what I've done wrong, but image codes elsewhere on the site are displaying fine. Any idea what may be wrong?

PhilJ 08-30-2012 08:38 AM

Re: X-Cart Adapt Template
 
Quote:

Another issue that I have is: in the submit a testimonial page, the image code does not appear. I'm not sure what I've done wrong, but image codes elsewhere on the site are displaying fine. Any idea what may be wrong?

Ensure that your /captcha directory in your store root folder is writable (CHMOD 777).

Pitak 08-30-2012 09:48 AM

Re: X-Cart Adapt Template
 
Quote:

Originally Posted by PhilJ
Ensure that your /captcha directory in your store root folder is writable (CHMOD 777).

Thanks, it works like a charm.

Quote:

Originally Posted by PhilJ
I will look into this, it needs custom coding, you'll have to make do with input qty boxes for now.


I've the "Show quantity selector as input textbox" at General Setting::Appearance set to off, so the qty selectors at the "Featured Products" list (and the category product lists) are now pull-down menus with only the available quantity in stock as the available options.

Since X-cart already has the code to do this, can't you reuse them for your other list pages?

KCAutosound 08-30-2012 02:41 PM

Re: X-Cart Adapt Template
 
silly question probably but when I go to the Testimonials on the Admin side I get the following message.

"Couldn't execute query. Access denied for user 'apache'@'localhost' (using password: NO) - SELECT * FROM testimonials WHERE 1=1 LIMIT 0"

Also it could be due to me being confused with the config for the testimonial_send.php file. I'm not quite sure how I'm actually supposed to input my settings.

$mysqlLink = @mysql_connect(
"localhost", // <- Database Hostname
"username", // <- Database Username
"password" // <- Database Password
);
if (mysql_errno() == 0) { @mysql_select_db("database", $mysqlLink); } // <- Database Name

Am I supposed to replace the "username" and the "password" with mine?


Another thing I noticed is when submitting a testimonial the Captcha code isn't displaying but does this have to do with the initial database settings problem.

JacksmithxD 08-31-2012 02:19 AM

Re: X-Cart Adapt Template
 
Quote:

Originally Posted by KCAutosound
silly question probably but when I go to the Testimonials on the Admin side I get the following message.

"Couldn't execute query. Access denied for user 'apache'@'localhost' (using password: NO) - SELECT * FROM testimonials WHERE 1=1 LIMIT 0"

Also it could be due to me being confused with the config for the testimonial_send.php file. I'm not quite sure how I'm actually supposed to input my settings.

$mysqlLink = @mysql_connect(
"localhost", // <- Database Hostname
"username", // <- Database Username
"password" // <- Database Password
);
if (mysql_errno() == 0) { @mysql_select_db("database", $mysqlLink); } // <- Database Name

Am I supposed to replace the "username" and the "password" with mine?


Another thing I noticed is when submitting a testimonial the Captcha code isn't displaying but does this have to do with the initial database settings problem.


Replace the Username with the Database username and same goes with the password. :D


All times are GMT -8. The time now is 01:21 PM.

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