Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

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


Guest

Recommended Posts

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
Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

  • 2 weeks later...

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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
Link to comment
Share on other sites

@@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.

Link to comment
Share on other sites

@@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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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[dot]com, 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.

Edited by burt
remove commercial link
Link to comment
Share on other sites

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

 

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]

Link to comment
Share on other sites

  • 5 months later...

PROTIP: replace mysql_* and similar functions with tep_db_*

 

This addon does not play nicely with the newest versions of MySQL / PHP

 

Here's my server configuration:

 

Database Host: localhost (127.0.0.1)

Server OS: Linux 3.8.4-x86_64-linode31

Database: MySQL 5.5.30-log

Server Date: 2013-08-05 15:49:09 -0400 EDT

Database Date: 2013-08-05 19:49:09

Server Up Time: 19:49:09 up 89 days, 4:11, 1 user, load average: 0.39, 0.41, 0.41

HTTP Server: nginx/1.4.1

PHP Version: 5.5.0-pl0-gentoo (Zend: 2.5.0-dev)

 

 

(This is how I fixed an issue where the admin page was not populating the database.)

Edited by panicgripdesigns

A little knowledge of php goes a long way.

Link to comment
Share on other sites

@@panicgripdesigns

 

PHP Version: 5.5 / Database: MySQL 5.5.30

 

This current release of this contribution was made compatible with PHP v5.3.x and has not been tested on any another versions. There is no concern for worry though as PHP 5.5 is NOT a stable release. Hell, 5.4.x is barely working correctly.

 

 

 

Chris

Edited by DunWeb
Link to comment
Share on other sites

Understood Chris. Just pasting this here incase anyone else wants to modify their download of the contribution to use proper oscommerce functions. Figured I might save some people some time in the future. Also PHP 5.5 is a stable release...

 

http://php.net/downloads.php

Edited by panicgripdesigns

A little knowledge of php goes a long way.

Link to comment
Share on other sites

Hi, @@DunWeb:

 

I have installed YMM contribution and it works perfectly on websites paddockmotor[dot]com and bateriaparamoto[dot]com, but I have a problem with loading times of web.

 

Can you avoid the initial charge of the script on the main page (index.php) and run it from another page as index2.php or selecvehicle.php, for example?

 

Thank you very much.

 

 

Link to comment
Share on other sites

Hi Nacho,

 

Nice site to analyze page load times and let you see what you can improve.

http://gtmetrix.com/

 

Also a nice tip from

 

@@kymation

 

If you want to see a real improvement in load time, move all of your CSS files ahead of the Javascript files in template_top.php. The more external files you have the bigger the difference.

 

Make sure you keep in same order worked great for me gained 3% on that alone.

 

Of course you can also think about turning on cache.

 

All in all the page load is not bad on my side but could be better.

 

Regards

Joli

To improve is to change; to be perfect is to change often.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...