Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

Someone hiozo work, any ideas

 

<?php 
  // BOF Separate Pricing Per Customer
    if(!tep_session_is_registered('sppc_customer_group_id')) { 
    $customer_group_id = '0';
    } else {
     $customer_group_id = $sppc_customer_group_id;
    }
  // EOF Separate Pricing Per Customer

if ($product_info['products_bundle'] == "yes") {
$products_bundle = $product_info['products_bundle'];
//echo TEXT_BUNDLE_CONTENTS . "<br><table>";
if ($customer_group_id != '0') {
$bundle_query = tep_db_query(" SELECT pd.products_name, pb.*, p.products_bundle, p.products_id, pgp.products_price
FROM products p LEFT JOIN products_group_prices_cg_".(int)$customer_group_id." pgp using(products_id)
INNER JOIN products_description pd
ON p.products_id=pd.products_id
INNER JOIN products_bundles pb
ON pb.subproduct_id=pd.products_id 
WHERE pb.bundle_id = " . tep_get_prid($products_id) . " and language_id = '" . (int)$languages_id . "'");
} else {
$bundle_query = tep_db_query(" SELECT pd.products_name, pb.*, p.products_bundle, p.products_id, p.products_price
FROM products p 
INNER JOIN products_description pd
ON p.products_id=pd.products_id
INNER JOIN products_bundles pb
ON pb.subproduct_id=pd.products_id 
WHERE pb.bundle_id = " . tep_get_prid($products_id) . " and language_id = '" . (int)$languages_id . "'");
}

 

Error

1146 - Table 'patagonia.products_group_prices_cg_2' doesn't exist

 

SELECT pd.products_name, pb.*, p.products_bundle, p.products_id, pgp.products_price FROM products p LEFT JOIN products_group_prices_cg_2 pgp using(products_id) INNER JOIN products_description pd ON p.products_id=pd.products_id INNER JOIN products_bundles pb ON pb.subproduct_id=pd.products_id WHERE pb.bundle_id = 29 and language_id = '3'

 

Im using Bundle 1.5.1 and SPPC 4.2

Posted
Someone hiozo work, any ideas

 

Error

1146 - Table 'patagonia.products_group_prices_cg_2' doesn't exist

Try logging in as a customer with customer group id 2 and in a product listing on index.php do a sort by price. If your template doesn't have that option adding &sort=3a manually to the url might trigger it too. The table will be made automatically.

Posted
Try logging in as a customer with customer group id 2 and in a product listing on index.php do a sort by price. If your template doesn't have that option adding &sort=3a manually to the url might trigger it too. The table will be made automatically.

 

 

Not work

 

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 '2 pgp using(products_id) INNER JOIN products_description pd ON p.products_id=pd' at line 2

 

SELECT pd.products_name, pb.*, p.products_bundle, p.products_id, pgp.products_price FROM products p LEFT JOIN customer_group_id=2 pgp using(products_id) INNER JOIN products_description pd ON p.products_id=pd.products_id INNER JOIN products_bundles pb ON pb.subproduct_id=pd.products_id WHERE pb.bundle_id = 29 and language_id = '3'

 

 

SELECT pd.products_name, pb.*, p.products_bundle, p.products_id, pgp.products_price
FROM products p LEFT JOIN customer_group_id=".(int)$customer_group_id."  pgp using(products_id)
INNER JOIN products_description pd
ON p.products_id=pd.products_id
INNER JOIN products_bundles pb
ON pb.subproduct_id=pd.products_id 
WHERE pb.bundle_id = " . tep_get_prid($products_id) . " and language_id = '" . (int)$languages_id . "'");
} else {
$bundle_query = tep_db_query(" SELECT pd.products_name, pb.*, p.products_bundle, p.products_id, p.products_price
FROM products p 
INNER JOIN products_description pd
ON p.products_id=pd.products_id
INNER JOIN products_bundles pb
ON pb.subproduct_id=pd.products_id 
WHERE pb.bundle_id = " . tep_get_prid($products_id) . " and language_id = '" . (int)$languages_id . "'");
}

 

any ideas

 

Help

Posted
Not work

Well, either this comes from another place or you changed LEFT JOIN products_group_prices_cg_".(int)$customer_group_id." pgp using(products_id) to LEFT JOIN customer_group_id=".(int)$customer_group_id." pgp using(products_id). The blue version is dead wrong.

Posted
Well, either this comes from another place or you changed LEFT JOIN products_group_prices_cg_".(int)$customer_group_id." pgp using(products_id) to LEFT JOIN customer_group_id=".(int)$customer_group_id." pgp using(products_id). The blue version is dead wrong.

 

not work

 

1146 - Table 'patagonia.products_group_prices_cg_2' doesn't exist

 

SELECT pd.products_name, pb.*, p.products_bundle, p.products_id, pgp.products_price FROM products p LEFT JOIN products_group_prices_cg_2 pgp using(products_id) INNER JOIN products_description pd ON p.products_id=pd.products_id INNER JOIN products_bundles pb ON pb.subproduct_id=pd.products_id WHERE pb.bundle_id = 29 and language_id = '3'

 

any help or idea

Posted
1146 - Table 'patagonia.products_group_prices_cg_2' doesn't exist

 

any help or idea

Then you didn't do what I asked you to do in an earlier post. Perhaps you have more luck doing it manually in phpMyAdmin:

create table products_group_prices_cg_2 (products_id int NOT NULL default '0', products_price decimal(15,4) NOT NULL default '0.0000', specials_new_products_price decimal(15,4) default NULL, status tinyint, primary key (products_id);
insert into products_group_prices_cg_2 select p.products_id, p.products_price, NULL as specials_new_products_price, NULL as status FROM products p;
update products_group_prices_cg_2 ppt left join products_groups pg using(products_id) set ppt.products_price = pg.customers_group_price where ppt.products_id = pg.products_id and pg.customers_group_id = '2';
update products_group_prices_cg_2 ppt left join specials s using(products_id) set ppt.specials_new_products_price = s.specials_new_products_price, ppt.status = s.status where ppt.products_id = s.products_id and s.customers_group_id = '2';

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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