| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Easily add Static Page (FAQ) Link on Products | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
Easily add Static Page (FAQ) Link on Products
Some old code laying around, decided I would release it. This was done on 3.5.x so it may need revamping for 4.0.x.
This mod will give you a drop down list of all static pages on modify product pages so that you can easily select them and associate them. Use the below SQL in patch/upgrade to add the additional faq field: Code:
Edit, include/product_modify.php Code:
You'll also need to update the db query so comment out the similar line and add this one instead. Code:
Now edit, skin1/main/product_modify.tpl and add: Code:
You'll also need add a link in your product.tpl page that calls the link, like so: Code:
Happy X-Carting!
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart. |
|||||||||
#2
|
|||||||
|
|||||||
Adding dropdown to product table
Iб╢m trying to add a dropdown list to the products table. What Iб╢ve done is pretty the same you did with the FAQ page.
Code:
include/product_modify.php Code:
Updated the database query Code:
But then I edited skin1/main/product_details.tpl Code:
After that I included the new field in the product skin1/customer/main/product.tpl Code:
It all looks fine. But it seems that there is something wrong with the database query. I get the option fields while adding a product but it shows only a "O" on the customer front-end product page. Any help would be highly appreciated.
__________________
Xcart Pro Version 4.0.12 |
|||||||
#3
|
|||||||||
|
|||||||||
Re: Easily add Static Page (FAQ) Link on Products
Any one know if this will work on 4.0x??
Quote:
|
|||||||||
#5
|
|||||||
|
|||||||
I did everything in this hack and it works fine as designed.
But instead of using the generic FAQ name, I wanted to use the page title. I already added a field in database for it. The question is (I am new to smarty), how do I get that $pages[num].title? Code:
Something like Code:
Any help is greatly appreciated. Thank you
__________________
X-Cart Gold 4.0.17 [unix] X-Cart Gold 4.0.18 [unix] |
|||||||
#6
|
|||||||
|
|||||||
I improved this a little, so
1-It displays the title of the FAQ instead of 'Product FAQ' 2-It will display only if there are FAQ for the product in product.php towards the end, before Code:
I added: Code:
and in skin1/customer/main/product.tpl Code:
__________________
X-Cart Gold 4.0.17 [unix] X-Cart Gold 4.0.18 [unix] |
|||||||
|
|||
X-Cart forums © 2001-2020
|