Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Attribute Sets Plus


toasty

Recommended Posts

Hi I'm getting an SQl error message

 

when I go to update a set and go to hit save I get

 

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 'WHERE products_attributes_sets_elements_id = 27' at line 1

 

UPDATE products_attributes_sets_elements SET options_values_id = 26, options_values_price = 0.0000, price_prefix = '+', sort_order = WHERE products_attributes_sets_elements_id = 27

 

[TEP STOP]

 

anyone know the fix?

Link to comment
Share on other sites

ATRIBUTES SET PLUS + SPPC + HIDDEN PRODUCTS SPPC + ATRIBUTES HIDEN

 

I get an error on product_info.php page:

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 customers_group_id = '2'' at line 1
select products_attributes_id, options_values_price, price_prefix from products_attributes_groups where products_attributes_id IN (,) AND customers_group_id = '2'
[TEP STOP]

 

part of code:

<?php
// BOF SPPC Hide attributes from customer groups
      $products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' and find_in_set('".$customer_group_id."', attributes_hide_from_groups) = 0 ");
      $products_attributes = tep_db_fetch_array($products_attributes_query);
   if ($products_attributes['total'] > 0) {
?>
           <tr>
             <td class="main" colspan="2"><?php echo TEXT_PRODUCT_OPTIONS; ?></td>
           </tr>
<?php
             $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' and find_in_set('".$customer_group_id."', attributes_hide_from_groups) = 0 order by popt.products_options_name");
     while ($products_options_name = tep_db_fetch_array($products_options_name_query)) {
       $products_options_array = array();
         $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix, pa.products_attributes_id from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "' and find_in_set('".$customer_group_id."', attributes_hide_from_groups) = 0");
// BOF Linkmatics attributes sets plus			        		      
 $products_options_query = tep_db_query("
 SELECT pov.products_options_values_id, pov.products_options_values_name, 
      pa.options_values_price, pa.price_prefix , pase.sort_order
     FROM " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . 
           TABLE_PRODUCTS_ATTRIBUTES_SETS_TO_PRODUCTS . " pas2pa, " . 
           TABLE_PRODUCTS_ATTRIBUTES_SETS . " pas, " .
           TABLE_PRODUCTS_ATTRIBUTES_SETS_ELEMENTS . " pase, " .
           TABLE_PRODUCTS_OPTIONS_VALUES . " pov
           WHERE      pa.products_id = '" . (int)$_GET['products_id'] . "'           
       AND pa.options_id = '" . $products_options_name['products_options_id'] . "'
       AND pas2pa.products_id = pa.products_id
       AND pas.products_attributes_sets_id = pas2pa.products_attributes_sets_id
       AND pas.products_options_id = pa.options_id
       AND pase.products_attributes_sets_id = pas.products_attributes_sets_id
       AND pase.options_values_id = pa.options_values_id
       AND pov.products_options_values_id = pa.options_values_id
       AND pov.language_id = '" . $languages_id . "'
       ORDER BY pase.sort_order, pa.options_values_id"); 
 // >>>>> BOF Linkmatics attributes sets plus patch v1.01
  if (tep_db_num_rows($products_options_query)== 0 ) {
   $products_options_query = tep_db_query("
      SELECT pov.products_options_values_id, pov.products_options_values_name,
             pa.options_values_price, pa.price_prefix , pa.options_values_id
        FROM " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " .
                 TABLE_PRODUCTS_OPTIONS_VALUES . " pov
        WHERE pa.products_id = '" . (int)$_GET['products_id'] . "'
          AND pa.options_id = '" . $products_options_name['products_options_id'] . "'
          AND pov.products_options_values_id = pa.options_values_id
          AND pov.language_id = '" . $languages_id . "'
        ORDER BY pa.options_values_id");
  }
// <<<<< EOF Linkmatics attributes sets plus patch v1.01      
// EOF Linkmatics attributes sets plus 
	$list_of_prdcts_attributes_id = '';
	$products_options = array(); // makes sure this array is empty again
       while ($_products_options = tep_db_fetch_array($products_options_query)) {
	$products_options[] = $_products_options;
	$list_of_prdcts_attributes_id .= $_products_options['products_attributes_id'].",";
}

     if (tep_not_null($list_of_prdcts_attributes_id) && $customer_group_id != '0') { 
        $select_list_of_prdcts_attributes_ids = "(" . substr($list_of_prdcts_attributes_id, 0 , -1) . ")";
//     $pag_query = tep_db_query("select products_attributes_id, options_values_price, price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES_GROUPS . " where products_attributes_id IN " . $select_list_of_prdcts_attributes_ids . " AND customers_group_id = '" . $this->cg_id . "'");	 
      $pag_query = tep_db_query("select products_attributes_id, options_values_price, price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES_GROUPS . " where products_attributes_id IN " . $select_list_of_prdcts_attributes_ids . " AND customers_group_id = '" . $customer_group_id . "'");
 while ($pag_array = tep_db_fetch_array($pag_query)) {
	 $cg_attr_prices[] = $pag_array;
 }
// substitute options_values_price and prefix for those for the customer group (if available)

 

 

If I remove from

// BOF Linkmatics attributes sets plus

TO

// BOF Linkmatics attributes sets plus

 

it works fine.

 

Any suggestion??

Link to comment
Share on other sites

// <<<<< EOF Linkmatics attributes sets plus patch v1.01

// EOF Linkmatics attributes sets plus

$list_of_prdcts_attributes_id = '';

$products_options = array(); // makes sure this array is empty again

while ($_products_options = tep_db_fetch_array($products_options_query)) {

$products_options[] = $_products_options;

$list_of_prdcts_attributes_id .= $_products_options['products_attributes_id'].",";

}

 

if (tep_not_null($list_of_prdcts_attributes_id) && $customer_group_id != '0') {

$select_list_of_prdcts_attributes_ids = "(" . substr($list_of_prdcts_attributes_id, 0 , -1) . ")";

// $pag_query = tep_db_query("select products_attributes_id, options_values_price, price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES_GROUPS . " where products_attributes_id IN " . $select_list_of_prdcts_attributes_ids . " AND customers_group_id = '" . $this->cg_id . "'");

$pag_query = tep_db_query("select products_attributes_id, options_values_price, price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES_GROUPS . " where products_attributes_id IN " . $select_list_of_prdcts_attributes_ids . " AND customers_group_id = '" . $customer_group_id . "'");

while ($pag_array = tep_db_fetch_array($pag_query)) {

$cg_attr_prices[] = $pag_array;

}

// substitute options_values_price and prefix for those for the customer group (if available)

 

Hi - just passing through!

The line identified (underlined) above is returning an empty list [this is shown as: IN (,) in your error]. I'm guessing MySQL does'nt like it. I have not looked at this extension to ASP so cannot help further - suggest contacting the author of that piece OR revert to an earlier version of ASP that works.

cheers

 

Chris.

ps: or - another guess - is your database empty? Maybe it works when you have data (products and attributes) in it and the author of the extension did not account for it being empty?. Just a thought! Good luck.

Link to comment
Share on other sites

  • 2 weeks later...

please can someone help!!

 

i have installed this contribution

thought i was very careful doing so - but obviously made a mistake somewhere along the way

 

the front of my store looks okay

but when i log into the admin, i log in okay

however when i click on 'catalog' - a blank page loads

 

is there something or somewhere obvious to check before i reload my backup and start from scratch again

 

Thanks in anticipation

(btw - i have used this contribution on a previous site and it was excellent - just a bit gutted atm)

 

Gavin

Link to comment
Share on other sites

  • 2 months later...

I really need this contribution but I can't figure out how to install it. I have a LOT of products with a lot of attributes to add so I really need this. I downloaded the file to my computer and all I see is installation notes for fixing a bug. Huh? Where's the contribution?

Link to comment
Share on other sites

  • 2 months later...

Is there a way to create an attribute that increases the price by a percentage of the total price? For instance: A watch is $100.00 and an extended warranty for one year is 11% of the price; two years is 25% and three years is 39%.

Link to comment
Share on other sites

  • 4 weeks later...

I just installed Attribute Sets Plus 1.3.3 with the multi language support today on osC 2.2RC2....From what I've seen so far, it is a major time saver! Thank you!

 

I do have one question/issue. When deleting a AS from a product, I saw from the posting back in '07 that you must edit the product, and than check off the (remove set) box, click preview and update. However when I click preview I see

 

"Warning: No file uploaded." (at the top of the screen)

 

Verify changes, and click update.

 

All changes are made ok (double checked), except AS still exists for that product.

 

Any help would be appreciated.

Link to comment
Share on other sites

  • 2 months later...
  • 1 month later...

I am developing a store that is selling t-shirts and other clothing. I have used this addon to more easily add sizes to each item. Has anyone else had the problem of the selected attributes in the order, example large, not showing up in the invoice, packing slip or the order view in the store admin?

Link to comment
Share on other sites

  • 2 months later...
  • 2 weeks later...

No it doesn't. I hope someone makes it for 2.3.1 :)

There is a problem with /catalog/includes/classes/payment.php

The admin part can work OK with some small changes

Link to comment
Share on other sites

There is a problem with /catalog/includes/classes/payment.php

The admin part can work OK with some small changes

It looks like ship2pay ver 1.5 works with 2.3.1 with some minor changes

Link to comment
Share on other sites

  • 1 month later...

It looks like ship2pay ver 1.5 works with 2.3.1 with some minor changes

I have a problem with ship2pay in osc 2.3.1. How to properly change this module?

How this change?:

open the file catalog/admin/includes/boxes/modules.php
add the following at the end:
'<a href="' . tep_href_link(FILENAME_SHIP2PAY, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_MODULES_SHIP2PAY . '</a>'

Link to comment
Share on other sites

  • 3 months later...

Is this still available or anything like it

I downloaded the zip and all t is is a text file saying

 

PROBLEM: THE ADMINISTRATOR LOGIN SCREEN IS BLOCKED

 

All works fine in localhost but when I transfer the files to my server by FTP, the Administrator Login Screen is blocked.

 

FIX:

 

In the files:

 

/catalog/admin/includes/database_tables.php

/catalog/includes/database_tables.php

 

Insert a space before 'products_attributes_sets_elements'.

 

BEFORE:

 

define('TABLE_PRODUCTS_ATTRIBUTES_SETS_ELEMENTS','products_attributes_sets_elements');

 

AFTER:

 

define('TABLE_PRODUCTS_ATTRIBUTES_SETS_ELEMENTS', 'products_attributes_sets_elements');

 

------------------------------------------------------------------------------------

 

SunDust

Link to comment
Share on other sites

  • 1 month later...

Need alittle help jus uploaded all the attributes plus but seem to be missing something pulling this error

 

Fatal error: Call to undefined function jjg_db_getAttributeSetId() in /home/content/38/7787638/html/shop/catalog/admin/products_attributes_sets_edit.php on line 85

 

 

----- CODE ---

 

<?php

//******************************************************************************************

//******************************* Default Attribute Set Page *******************************

//******************************************************************************************

}else{

 

 

$arrPAS_IDs = jjg_db_getAttributeSetId($_GET['pID']);

 

 

 

$product_info_sql = "SELECT * FROM " . TABLE_PRODUCTS_DESCRIPTION . "

where products_id = " . (int)$_GET['pID'];

$product_info_query = tep_db_query($product_info_sql);

$product_info = tep_db_fetch_array($product_info_query);

 

 

$attributeSetsNames_query = tep_db_query("select products_attributes_sets_id, products_attributes_sets_name from " . TABLE_PRODUCTS_ATTRIBUTES_SETS . " where 1 order by products_attributes_sets_name");

?>

<tr><td>

<?php echo tep_draw_form("asEditForm",FILENAME_PRODUCTS_ATTRIBUTES_SETS_EDIT,'action=save&products_id='.$_GET['pID'].'&cPath='.$_GET['cPath']); ?>

<table border="0" width="80%" cellspacing="0" cellpadding="1">

<tr><td colspan="3" align=right>

 

 

ANy help would be appreciated or point in the right direction on what i may have missed

Link to comment
Share on other sites

  • 1 year later...

Help! I've lost everything, I log into my OScommerce site and cannot access anything that was there before... it's just a blank screen. Can't add any products, not change any information relating to my shop.

 

My shop however seems unaffected by this, but this is no good if I cannot add more items.

 

And cos I'm a complete idiot, I didn't back up the files that were changed!!!

 

I don't want to have to re-add all my stock as it's taken a week already (working a normal 40hr week job inbetween)

 

Please please help

Link to comment
Share on other sites

  • 1 month later...

I just installed Attributes Sets Plus 2.3.1. Is this suppose to work with osCommerce 2.2 RC2? I am having quite a few problems. In the "Catalog" box, "Product Attributes Sets" does not show correctly however it does point to the correct link, products_attributes_sets.php however it returns an error message as it is looking for a file template_top.php which does not exist.

Link to comment
Share on other sites

  • 1 month later...
  • 6 months later...

I just encountered a problem. I changed some of the items in an Attribute set and now i get this error message "1104 - The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay..." and the page has no attribute sets or photos. I have tried deleting the set and re-creating it. I can create it with fewer items and sometimes it will work and sometimes not. When I put all 84 items in the set it never works. Any help would be appreciated. Thank you.

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