Jump to content



Latest News: (loading..)

* * * * * 3 votes

[Contribtion] Year/Make/Model for OSC v2.3.x


  • Please log in to reply
217 replies to this topic

#201   m0jon

m0jon
  • Members
  • 15 posts
  • Real Name:Jon
  • Gender:Male
  • Location:UK

Posted 20 January 2013 - 01:11 PM

@kenkja

Hi

please could you tell me how you fixed the problem with the index.php file and adding the required text around }else{ part as i am having the same problem

Cheers

Jon

#202   panthercoug

panthercoug
  • Members
  • 20 posts
  • Real Name:Mark Sandberg
  • Gender:Male
  • Location:USA

Posted 21 January 2013 - 12:23 AM

Chris,
   Thank you for a awesome contribution.

If anyone could point me in the right directions here, Most everything appears to be working well with a few exceptions. I select year make model and it brings me to a page showing only the products that will fit which is correct. But it does not appear to be filtering the categories infobox, or new products module?

Does anyone have a suggestion which code I would be looking at? I have all filters selected to yes in the admin they just do not appear to be working correctly.

Edited by panthercoug, 21 January 2013 - 12:27 AM.


#203   m0jon

m0jon
  • Members
  • 15 posts
  • Real Name:Jon
  • Gender:Male
  • Location:UK

Posted 24 January 2013 - 06:28 PM

Hi

Got this addon working but just notice on my config page within admin the Year Make Model link appears twice. Anyone else experienced this?

Cheers

Edited by m0jon, 24 January 2013 - 06:28 PM.


#204   DunWeb

DunWeb

    The Censored One

  • Members
  • 12,724 posts
  • Real Name:Chris
  • Gender:Male
  • Location:Ontario, Canada

Posted 24 January 2013 - 07:19 PM

@m0jon

That means you ran the SQL statement twice while installing it.  I suggest you use PHPMYADMIN to remove one of the entries.




Chris
:|: Was this post helpful ? Click the LIKE THIS button :|:

See my Profile (click here)

#205   torqauto

torqauto
  • Members
  • 2 posts
  • Real Name:Ben

Posted 27 January 2013 - 02:15 PM

Hello
I apologize in advance for this question as im new to all this and I have been trying to learn all this without help.So far so good. But im stuck on this part as it states

"10] install box from Admin >> Modules >>Boxes

11] install box from Catalog >> ymmajax.php

What does this mean by install?

and how do i go about doing this install?

#206   torqauto

torqauto
  • Members
  • 2 posts
  • Real Name:Ben

Posted 27 January 2013 - 04:23 PM

Hello
I apologize in advance for this question as im new to all this and I have been trying to learn all this without help.So far so good. But im stuck on this part as it states

"10] install box from Admin >> Modules >>Boxes (Update ok i figured this out DUR :)

11] install box from Catalog >> ymmajax.php < still dont know about this

What does this mean by install?

and how do i go about doing this install?

#207   motoenvena

motoenvena
  • Members
  • 12 posts
  • Real Name:Nacho

Posted 10 February 2013 - 06:18 PM

Hi all:

First, I want to thank all developers to share their code.
I have a problem with the Year, Make, Model contribution. This works perfectly with USU5 (Ultimate SEO Urls 5) off, but when the contribution USU5 is enabled, a SQL query fails when I'm browsing a category and use the box Year, Make, Model.

V.g:

Run ok:
http://www.paddockmotor.com/index.php?Make=Honda&Model=CBR+1000+RR+Fireblade+&Year=2012

If I'm in a category:
http://www.paddockmotor.com/aceites-c-6.html

When selecting a motorcycle with the filter:
http://www.paddockmotor.com/aceites-c-6.html?Make=Honda&Model=CBR1000RRFireblade&Year=2012&x=31&y=16

Then get this error:
================================
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server

version for the right syntax to use near ') and p.products_status = '1' and p.products_id =

pc.products_id and cd.categor' at line 1

select p.products_id, p.products_image, p.products_tax_class_id, p.products_price, cd.categories_id,

cd.categories_alt_imagen from products p, categories_description cd, products_to_categories pc where

p.products_id in () and p.products_status = '1' and p.products_id = pc.products_id and

cd.categories_id = pc.categories_id and cd.language_id = '3' order by p.products_date_added desc

limit 10

[TEP STOP]

=====================================
Please, can anyone help me?

Thank you very much.


The urls will not work because the contribution YMM is disabled

Edited by motoenvena, 10 February 2013 - 06:19 PM.


#208   DunWeb

DunWeb

    The Censored One

  • Members
  • 12,724 posts
  • Real Name:Chris
  • Gender:Male
  • Location:Ontario, Canada

Posted 10 February 2013 - 09:07 PM

@motoenvena

The error isn't related to the YMM contribution, check your SEO URL's exceptions and add one if needed.



Chris
:|: Was this post helpful ? Click the LIKE THIS button :|:

See my Profile (click here)

#209   motoenvena

motoenvena
  • Members
  • 12 posts
  • Real Name:Nacho

Posted 11 February 2013 - 12:54 AM

Hello:
Thank you very much for your quick response.
But how I can create an exception for the contribution USU5?

Something like this?

  #categories
  #note to work perfectly must make a symlink of index.php -> index2.php

  #condition: do following only if query_string not includes cPath
  RewriteCond %{QUERY_STRING} !cPath   
  #rewrite "name path" to index.php?cPath
  RewriteRule ^(.*)-c-(.*)$ index2\.php?cPath=$2 [L,NC,QSA]  
  #the same if you use the standard and no rewrite
  #RewriteRule ^index\.php/(.*)-c-(.*)$ index2\.php?cPath=$2 [L,NC,QSA]  
  ######################################################

Thank you very much.
Greetings from Spain.

Edited by motoenvena, 11 February 2013 - 01:05 AM.


#210   motoenvena

motoenvena
  • Members
  • 12 posts
  • Real Name:Nacho

Posted 11 February 2013 - 09:40 PM

View Postmotoenvena, on 11 February 2013 - 12:54 AM, said:

Hello:
Thank you very much for your quick response.
But how I can create an exception for the contribution USU5?

Something like this?

  #categories
  #note to work perfectly must make a symlink of index.php -> index2.php

  #condition: do following only if query_string not includes cPath
  RewriteCond %{QUERY_STRING} !cPath   
  #rewrite "name path" to index.php?cPath
  RewriteRule ^(.*)-c-(.*)$ index2\.php?cPath=$2 [L,NC,QSA]  
  #the same if you use the standard and no rewrite
  #RewriteRule ^index\.php/(.*)-c-(.*)$ index2\.php?cPath=$2 [L,NC,QSA]  
  ######################################################

Thank you very much.
Greetings from Spain.

I've done something like this but it only works sometimes:

# Excepción YMM
RedirectMatch 301 /(.*)-c-(.*).html?Make=(.*)&Model=(.*)&Year=(.*) /index.php?cPath=$2.html?Make=$3&Model=$4&Year=$5

I've done it in the .htaccess file

#211   motoenvena

motoenvena
  • Members
  • 12 posts
  • Real Name:Nacho

Posted 12 February 2013 - 12:26 AM

@DunWeb

I've done something like this but it only works sometimes:

# Excepción YMM
RedirectMatch 301 /(.*)-c-(.*).html?Make=(.*)&Model=(.*)&Year=(.*) /index.php?cPath=$2.html?Make=$3&Model=$4&Year=$5

I've done it in the .htaccess file

#212   lbcgear

lbcgear
  • Members
  • 7 posts
  • Real Name:SF

Posted 12 February 2013 - 04:16 AM

Hopfully someone can help me fix this.

When displaying the YYM on the product_info page the formatting is all messed up.

Orignal code:
<!-- YMM BOF -->
<p><?php echo TEXT_PRODUCTS_CAR_HEADING; ?><p>
<div id="ymm"><ul><li><u><b><?php echo TEXT_PRODUCTS_CAR_MAKE; ?></b></u></li>
<li><u><b><?php echo TEXT_PRODUCTS_CAR_MODEL; ?></b></li>
<li><u><b><?php echo TEXT_PRODUCTS_CAR_YEARS; ?></b></u></li>
</ul></div>
<?php
if (isset($HTTP_GET_VARS['products_id']) && $HTTP_GET_VARS['products_id'] != ''){

$q = tep_db_query("select * from products_ymm where products_id = ". (int) $HTTP_GET_VARS['products_id']);

if (tep_db_num_rows($q) > 0) {
while ($r = tep_db_fetch_array($q)) {
echo '<div id="ymmopt"><ul><li>' . ($r['products_car_make'] != '' ? $r['products_car_make'] : 'all') . '</li>
<li>' . ($r['products_car_model'] != '' ? $r['products_car_model'] : 'all') . '</li>
<li>' . $r['products_car_year_bof'] . ' - ' . $r['products_car_year_eof'].'</li></ul></div>';

}
} else {

echo '<div>Universal Product</div>';
}

}
?>
<div style="clear: both;"></div>
<!-- YMM EOF -->

Results in this weird formatting
Pic

So then I tried a addon to change the code to tables
<!-- YMM BOF -->
<td><?php echo TEXT_PRODUCTS_CAR_HEADING; ?></td>

<div id="ymm">
<table width="60%" border="0" cellspacing="0" cellpadding="0">
<tr align="center"><td><?php echo TEXT_PRODUCTS_CAR_MAKE; ?></td>
<td><?php echo TEXT_PRODUCTS_CAR_MODEL; ?></td>
<td><?php echo TEXT_PRODUCTS_CAR_YEARS; ?></td>
</tr></div>
<?php
if (isset($HTTP_GET_VARS['products_id']) && $HTTP_GET_VARS['products_id'] != ''){

$q = tep_db_query("select * from products_ymm where products_id = ". (int) $HTTP_GET_VARS['products_id']);

if (tep_db_num_rows($q) > 0) {
while ($r = tep_db_fetch_array($q)) {
echo '<div id="ymmopt">
<tr align="center">
	 <td>' . ($r['products_car_make'] != '' ? $r['products_car_make'] : 'all') . '</td>
	 <td>' . ($r['products_car_model'] != '' ? $r['products_car_model'] : 'all') . '</td>
	 <td>' . $r['products_car_year_bof'] . ' - ' . $r['products_car_year_eof'].'</td></tr></table></div>';

}
} else {

echo '<div>Universal Product</div>';
}

}
?>
<div style="clear: both;"></div>
<!-- YMM EOF -->

And the top TMM product looks a lot better but there is this when more then one YYM is listed.
Pic

I do not really care if I use tables or not I just want the formatting to look right when its displaying YMM.

Thanks in advance for your help :)

Edited by lbcgear, 12 February 2013 - 04:21 AM.


#213   motoenvena

motoenvena
  • Members
  • 12 posts
  • Real Name:Nacho

Posted 12 February 2013 - 06:31 AM

View PostDunWeb, on 10 February 2013 - 09:07 PM, said:

@motoenvena

The error isn't related to the YMM contribution, check your SEO URL's exceptions and add one if needed.



Chris
@DunWeb

Where should I add the SEO URL´s exceptions?
It can be in one of these two options?
  • /includes/modules/ultimate_seo_urls5/includes/uri_redirects_array.php
  • .htacces file
I just I have this problem with the YMM contribution and is very important to me that works perfectly. Please can you give me some more advice?

Thank you very much.

#214   kenkja

kenkja
  • Members
  • 242 posts
  • Real Name:Ken Johnson
  • Gender:Male
  • Location:Uk, Yorkshire

Posted 14 February 2013 - 05:29 PM

@m0jon

My apologies Jon, sorry wasn't ignoring you, just logged on for the first time in ages, but looks like you fixed it anyway.

ken
Os-commerce v2.3.3
Security Pro v11
Site Monitor
IP Trap
htaccess Protection
Bad Behaviour Block
Year Make Model
Document Manager
X Sell
Star Product
Modular Front Page
Modular Header Tags
Ultimate SEO Urls Pro

#215   motoenvena

motoenvena
  • Members
  • 12 posts
  • Real Name:Nacho

Posted 18 February 2013 - 10:37 AM

@kenkja
Hello:
Can you help me?
How I can run together USU5 and YMM contributions?
Thank you very much.
Regards,

#216   lbcgear

lbcgear
  • Members
  • 7 posts
  • Real Name:SF

Posted 18 February 2013 - 04:04 PM

View Postlbcgear, on 12 February 2013 - 04:16 AM, said:

Hopfully someone can help me fix this.

When displaying the YYM on the product_info page the formatting is all messed up.

Orignal code:
<!-- YMM BOF -->
<p><?php echo TEXT_PRODUCTS_CAR_HEADING; ?><p>
<div id="ymm"><ul><li><u><b><?php echo TEXT_PRODUCTS_CAR_MAKE; ?></b></u></li>
<li><u><b><?php echo TEXT_PRODUCTS_CAR_MODEL; ?></b></li>
<li><u><b><?php echo TEXT_PRODUCTS_CAR_YEARS; ?></b></u></li>
</ul></div>
<?php
if (isset($HTTP_GET_VARS['products_id']) && $HTTP_GET_VARS['products_id'] != ''){

$q = tep_db_query("select * from products_ymm where products_id = ". (int) $HTTP_GET_VARS['products_id']);

if (tep_db_num_rows($q) > 0) {
while ($r = tep_db_fetch_array($q)) {
echo '<div id="ymmopt"><ul><li>' . ($r['products_car_make'] != '' ? $r['products_car_make'] : 'all') . '</li>
<li>' . ($r['products_car_model'] != '' ? $r['products_car_model'] : 'all') . '</li>
<li>' . $r['products_car_year_bof'] . ' - ' . $r['products_car_year_eof'].'</li></ul></div>';

}
} else {

echo '<div>Universal Product</div>';
}

}
?>
<div style="clear: both;"></div>
<!-- YMM EOF -->

Results in this weird formatting
Pic

So then I tried a addon to change the code to tables
<!-- YMM BOF -->
<td><?php echo TEXT_PRODUCTS_CAR_HEADING; ?></td>

<div id="ymm">
<table width="60%" border="0" cellspacing="0" cellpadding="0">
<tr align="center"><td><?php echo TEXT_PRODUCTS_CAR_MAKE; ?></td>
<td><?php echo TEXT_PRODUCTS_CAR_MODEL; ?></td>
<td><?php echo TEXT_PRODUCTS_CAR_YEARS; ?></td>
</tr></div>
<?php
if (isset($HTTP_GET_VARS['products_id']) && $HTTP_GET_VARS['products_id'] != ''){

$q = tep_db_query("select * from products_ymm where products_id = ". (int) $HTTP_GET_VARS['products_id']);

if (tep_db_num_rows($q) > 0) {
while ($r = tep_db_fetch_array($q)) {
echo '<div id="ymmopt">
<tr align="center">
	 <td>' . ($r['products_car_make'] != '' ? $r['products_car_make'] : 'all') . '</td>
	 <td>' . ($r['products_car_model'] != '' ? $r['products_car_model'] : 'all') . '</td>
	 <td>' . $r['products_car_year_bof'] . ' - ' . $r['products_car_year_eof'].'</td></tr></table></div>';

}
} else {

echo '<div>Universal Product</div>';
}

}
?>
<div style="clear: both;"></div>
<!-- YMM EOF -->

And the top TMM product looks a lot better but there is this when more then one YYM is listed.
Pic

I do not really care if I use tables or not I just want the formatting to look right when its displaying YMM.

Thanks in advance for your help :)

Stll looking for help on this formatting issue. Anyone?

#217   motoenvena

motoenvena
  • Members
  • 12 posts
  • Real Name:Nacho

Posted 24 February 2013 - 07:10 PM

Hi:
I've solved my problem support and contributions USU5 YMM.
Finally, I uninstalled USU5 and I installed Ultimate SEO Url v2.2 by Chemo. This works perfectly with YMM contribution in osCommerce 2.2 rca.
You can check the result on the website PaddockMotor, my site for motorcycle parts and accessories.
Thank you very much everyone for your help.
I hope these pointers serve people who have the same problem as me.

#218   PupStar

PupStar
  • Members
  • 559 posts
  • Real Name:Mark
  • Gender:Male

Posted 24 February 2013 - 07:13 PM

well done for solving you problems however you do have more problems as I get this error when visiting the link you posted.

Quote

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') and p.products_status = '1' and p.products_id = pc.products_id and cd.categor' at line 1

select p.products_id, p.products_image, p.products_tax_class_id, p.products_price, cd.categories_id, cd.categories_alt_imagen from products p, categories_description cd, products_to_categories pc where p.products_id in () and p.products_status = '1' and p.products_id = pc.products_id and cd.categories_id = pc.categories_id and cd.language_id = '1' order by p.products_date_added desc limit 10

[TEP STOP]