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

Extra Field Search From product.tpl

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #11  
Old 07-03-2009, 04:47 PM
 
mrerotic mrerotic is offline
 

eXpert
  
Join Date: Feb 2009
Posts: 264
 

Default Re: Extra Field Search From product.tpl

Thanks man the problem is that there is a blank one being created after the last one. So if there are actually 3 stars its showing a 4th that is blank.
__________________
x-cart 4.2.3
AlteredCart Smart Search
Auto Featured Products Mod (Personal Mod)
BCSE Product Importer Pro & Drop Shipper Pro
CDSEO Pro
CMS EZRecommends
EE slider login (Personal Mod)
Next Prev Link Mod (Customized)
ShadowBox Detailed Images (Personal Mod)
Shop By Price (Customized)
Social Media (Personal Mod)
Switch Layout View (Personal Mod)
Special Offers
Testimonials (Personal Mod)
Whats New (Customized)
Reply With Quote
  #12  
Old 07-03-2009, 05:32 PM
 
mrerotic mrerotic is offline
 

eXpert
  
Join Date: Feb 2009
Posts: 264
 

Default Re: Extra Field Search From product.tpl

Also is there anyway to make this actually just search for the exact stars in the extra fields for stars?
__________________
x-cart 4.2.3
AlteredCart Smart Search
Auto Featured Products Mod (Personal Mod)
BCSE Product Importer Pro & Drop Shipper Pro
CDSEO Pro
CMS EZRecommends
EE slider login (Personal Mod)
Next Prev Link Mod (Customized)
ShadowBox Detailed Images (Personal Mod)
Shop By Price (Customized)
Social Media (Personal Mod)
Switch Layout View (Personal Mod)
Special Offers
Testimonials (Personal Mod)
Whats New (Customized)
Reply With Quote
  #13  
Old 07-03-2009, 05:54 PM
  gb2world's Avatar 
gb2world gb2world is offline
 

X-Wizard
  
Join Date: May 2006
Location: Austin, TX
Posts: 1,970
 

Default Re: Extra Field Search From product.tpl

That is odd. I'm not sure why there would be an extra array element like that. You should see it using the print_r and echo statements in the original php code I gave you. You can always fall back on your php knowledge and add a test for that in the php when creating the $explode_stars array. I would do it in the php if you expect you might have to do more programming for other cases later. You can look at example 2 here to see how to filter the array in php for blanks.

Or. just add another condition in the smarty that won't let anything print if the value is empty - maybe this will work:

Code:
{if $explode_stars[star_name] ne ""} {if $smarty.section.star_name.index ne 0 }, {/if}<a href="search.php?mode=search&by_title=on&by_shortdescr=on&by_fulldescr=on&by_sku=on&category_main=on &category_extra=on&search_in_subcategories=on&substring={$explode_stars[star_name]}">{$explode_stars[star_name]|replace:' ':'+'}</a> {/if}

If you can do the search you want on your advanced search page - just use the tip I gave you earlier to get the URL for the link. In advanced search, you can set up the criteria over which you want to search, and it will provide the URL.
__________________
X-CART (4.1.9,12/4.2.2-3/4.3.1-2/4.4.1-5)-Gold
(CDSEO, Altered-Cart On Sale, BCSE Preorder Backorder, QuickOrder, X-Payments, BCSE DPM Module)
Reply With Quote
  #14  
Old 07-03-2009, 07:31 PM
 
mrerotic mrerotic is offline
 

eXpert
  
Join Date: Feb 2009
Posts: 264
 

Default Re: Extra Field Search From product.tpl

awesome thanks man, but in regards to the search now, im trying to search only the extra field "Stars". And I can't select that in my advanced search. Any ideas?
__________________
x-cart 4.2.3
AlteredCart Smart Search
Auto Featured Products Mod (Personal Mod)
BCSE Product Importer Pro & Drop Shipper Pro
CDSEO Pro
CMS EZRecommends
EE slider login (Personal Mod)
Next Prev Link Mod (Customized)
ShadowBox Detailed Images (Personal Mod)
Shop By Price (Customized)
Social Media (Personal Mod)
Switch Layout View (Personal Mod)
Special Offers
Testimonials (Personal Mod)
Whats New (Customized)
Reply With Quote
  #15  
Old 07-03-2009, 07:46 PM
 
mrerotic mrerotic is offline
 

eXpert
  
Join Date: Feb 2009
Posts: 264
 

Default Re: Extra Field Search From product.tpl

Nevermind got it.. I didnt realize you can turn on extra field searches from the admin area. THX for all your help man.. AWESOME SUPPORT. THX A MILLION
__________________
x-cart 4.2.3
AlteredCart Smart Search
Auto Featured Products Mod (Personal Mod)
BCSE Product Importer Pro & Drop Shipper Pro
CDSEO Pro
CMS EZRecommends
EE slider login (Personal Mod)
Next Prev Link Mod (Customized)
ShadowBox Detailed Images (Personal Mod)
Shop By Price (Customized)
Social Media (Personal Mod)
Switch Layout View (Personal Mod)
Special Offers
Testimonials (Personal Mod)
Whats New (Customized)
Reply With Quote
  #16  
Old 07-03-2009, 08:05 PM
  gb2world's Avatar 
gb2world gb2world is offline
 

X-Wizard
  
Join Date: May 2006
Location: Austin, TX
Posts: 1,970
 

Default Re: Extra Field Search From product.tpl

you are welcome
__________________
X-CART (4.1.9,12/4.2.2-3/4.3.1-2/4.4.1-5)-Gold
(CDSEO, Altered-Cart On Sale, BCSE Preorder Backorder, QuickOrder, X-Payments, BCSE DPM Module)
Reply With Quote
  #17  
Old 07-04-2009, 12:08 AM
 
mrerotic mrerotic is offline
 

eXpert
  
Join Date: Feb 2009
Posts: 264
 

Default Re: Extra Field Search From product.tpl

gb2world - one last questions totally different. If I want to change how each page title is displayed, I know you can choose from two options in the admin area, but what if I want to make my own custom one for each page? Is there a simple fix for this? Or any ideas?
__________________
x-cart 4.2.3
AlteredCart Smart Search
Auto Featured Products Mod (Personal Mod)
BCSE Product Importer Pro & Drop Shipper Pro
CDSEO Pro
CMS EZRecommends
EE slider login (Personal Mod)
Next Prev Link Mod (Customized)
ShadowBox Detailed Images (Personal Mod)
Shop By Price (Customized)
Social Media (Personal Mod)
Switch Layout View (Personal Mod)
Special Offers
Testimonials (Personal Mod)
Whats New (Customized)
Reply With Quote
  #18  
Old 07-04-2009, 04:19 AM
  gb2world's Avatar 
gb2world gb2world is offline
 

X-Wizard
  
Join Date: May 2006
Location: Austin, TX
Posts: 1,970
 

Default Re: Extra Field Search From product.tpl

You can search the forum to find answers.
First, make sure you use this tip
Next, select the advanced search under the search in the top menu
next enter:
page AND title AND modify
in the search box
narrow your search by selecting
Storefront Design & Template Editing in 4.2.x
and select Search Now
__________________
X-CART (4.1.9,12/4.2.2-3/4.3.1-2/4.4.1-5)-Gold
(CDSEO, Altered-Cart On Sale, BCSE Preorder Backorder, QuickOrder, X-Payments, BCSE DPM Module)
Reply With Quote
  #19  
Old 07-21-2009, 11:05 AM
 
mrerotic mrerotic is offline
 

eXpert
  
Join Date: Feb 2009
Posts: 264
 

Default Re: Extra Field Search From product.tpl

Thanks gb2world any ideas on how to show all categories that a product is listed in? Same as we did here for the stars, but now I want to show each category.

Thanks in advance
__________________
x-cart 4.2.3
AlteredCart Smart Search
Auto Featured Products Mod (Personal Mod)
BCSE Product Importer Pro & Drop Shipper Pro
CDSEO Pro
CMS EZRecommends
EE slider login (Personal Mod)
Next Prev Link Mod (Customized)
ShadowBox Detailed Images (Personal Mod)
Shop By Price (Customized)
Social Media (Personal Mod)
Switch Layout View (Personal Mod)
Special Offers
Testimonials (Personal Mod)
Whats New (Customized)
Reply With Quote
  #20  
Old 07-21-2009, 01:36 PM
  gb2world's Avatar 
gb2world gb2world is offline
 

X-Wizard
  
Join Date: May 2006
Location: Austin, TX
Posts: 1,970
 

Default Re: Extra Field Search From product.tpl

I doubt that the category information is available to the product page in the default installation. You can use the tip I told you about in post #6 to see the smarty variables that are available to you. If it is there, you can update the template to display the categories.

If the categories are not there - you are going to have to write your own query to get the information and add that to the product.php file. I think you need to query the _products_categories table and find all categories for the productid.

If you understand the code in this thread (the sql query and the php), the concept is similar to what you want to do. You should be able to add an array with the categories to the $products array.
__________________
X-CART (4.1.9,12/4.2.2-3/4.3.1-2/4.4.1-5)-Gold
(CDSEO, Altered-Cart On Sale, BCSE Preorder Backorder, QuickOrder, X-Payments, BCSE DPM Module)
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > 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 03:07 PM.

   

 
X-Cart forums © 2001-2020