Jack_mcs Posted November 3, 2009 Author Share Posted November 3, 2009 I haven't had a chance to look at the problem. As soon as I do, I will post it here. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Jack_mcs Posted November 5, 2009 Author Share Posted November 5, 2009 The following changes, as needed, should be made to any shop using this contribution to prevent quotes from showing up where they shouldn't:  In includes/modules/also_purchased_products.php  FIND: $orders_query = tep_db_query("select p.products_id, p.products_image from " . TABLE_ORDERS_PRODUCTS . " opa, " . TABLE_ORDERS_PRODUCTS . " opb, " . TABLE_ORDERS . " o, " . TABLE_PRODUCTS . " p where opa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and opa.orders_id = opb.orders_id and opb.products_id != '" . (int)$HTTP_GET_VARS['products_id'] . "' and opb.products_id = p.products_id and opb.orders_id = o.orders_id and p.products_status = '1' group by p.products_id order by o.date_purchased desc limit " . MAX_DISPLAY_ALSO_PURCHASED); REPLACE WITH: $quotes = (defined('QUOTES_CATEGORY_NAME')) ? " and p.customers_email_address = '' and p.quotes_email_address = '' " : ''; $orders_query = tep_db_query("select p.products_id, p.products_image from " . TABLE_ORDERS_PRODUCTS . " opa, " . TABLE_ORDERS_PRODUCTS . " opb, " . TABLE_ORDERS . " o, " . TABLE_PRODUCTS . " p where opa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and opa.orders_id = opb.orders_id and opb.products_id != '" . (int)$HTTP_GET_VARS['products_id'] . "' and opb.products_id = p.products_id and opb.orders_id = o.orders_id and p.products_status = '1' " . $quotes . " group by p.products_id order by o.date_purchased desc limit " . MAX_DISPLAY_ALSO_PURCHASED);  If you have SiteMap SEO installed, in includes/classes/category_tree.php and includes/classes/category_tree_no_products.php  FIND: $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c left join " . TABLE_CATEGORIES_DESCRIPTION . " cd on c.categories_id = cd.categories_id where cd.language_id = '" . (int)$languages_id . "' order by c.parent_id, c.sort_order, cd.categories_name"); REPLACE WITH: $quotes = (defined('QUOTES_CATEGORY_NAME')) ? " and cd.categories_name NOT LIKE '" . QUOTES_CATEGORY_NAME . "' " : ''; $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c left join " . TABLE_CATEGORIES_DESCRIPTION . " cd on c.categories_id = cd.categories_id " . $quotes . " where cd.language_id = '" . (int)$languages_id . "' order by c.parent_id, c.sort_order, cd.categories_name");  If you have All Products SEO installed, in all-products.php,  FIND: $listing_sql = "select p.products_id, p.products_weight, p.products_quantity, p.products_model, pd.products_name, pd.products_description, p.products_image, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, p.products_date_added, m.manufacturers_name from " . ADD ABOVE: $quotes = (defined('QUOTES_CATEGORY_NAME')) ? " and p.customers_email_address = '' and p.quotes_email_address = '' " : ''; FIND: TABLE_SPECIALS . " s on ( p.products_id = s.products_id ) " . $where . " and pd.language_id = '" . $languages_id . "'"; REPLACE WITH: TABLE_SPECIALS . " s on ( p.products_id = s.products_id ) $where $quotes and pd.language_id = '" . $languages_id . "'";  If you have Google XML Sitemap SEO installed, in googlesitemap/sitemap.class.php and googlesitemap/sitemap.class_Alternate.php  FIND: function GenerateProductSitemap(){ $sql = "SELECT products_id as pID, products_date_added as date_added, products_last_modified as last_mod, products_ordered FROM " . TABLE_PRODUCTS . " WHERE products_status='1' REPLACE WITH: function GenerateProductSitemap(){ $quotes = (defined('QUOTES_CATEGORY_NAME')) ? " and p.customers_email_address = '' and p.quotes_email_address = '' " : ''; $sql = "SELECT products_id as pID, products_date_added as date_added, products_last_modified as last_mod, products_ordered FROM " . TABLE_PRODUCTS . " WHERE products_status='1'" . $quotes . "  FIND: function GenerateCategorySitemap(){ $sql = "SELECT categories_id as cID, date_added, last_modified as last_mod FROM " . TABLE_CATEGORIES . " ORDER BY parent_id ASC, sort_order ASC, categories_id ASC";  REPLACE WITH: function GenerateCategorySitemap(){ $quotes = (defined('QUOTES_CATEGORY_NAME')) ? " cd.categories_name NOT LIKE '" . QUOTES_CATEGORY_NAME . "' " : ''; $sql = "SELECT c.categories_id as cID, c.date_added, c.last_modified as last_mod FROM " . TABLE_CATEGORIES . " c left join " . TABLE_CATEGORIES_DESCRIPTION . " cd on c.categories_id = cd.categories_id where " . $quotes . " ORDER BY c.parent_id ASC, c.sort_order ASC, c.categories_id ASC";  If you have version 2 of Google Feeder installed, in admin/googlefeeder.php,  FIND: define('DEFAULT_LANGUAGE', 1); //Change this to the id of your language. BY default 1 is english ADD BENEATH: define('QUOTES_CATEGORY_NAME','quotes'); //if the Quotes contribution is installed, enter the name of the quotes category here  FIND: $sql = " SELECT concat( '" . $productURL . "' ,products.products_id) AS product_url, ADD ABOVE: $quotes = (defined('QUOTES_CATEGORY_NAME')) ? " and p.customers_email_address = '' and p.quotes_email_address = '' " : ''; FIND: AND categories.categories_id=categories_description.categories_id REPLACE WITH: AND categories.categories_id=categories_description.categories_id " . $quotes . " FIND: $catInfo = " ADD ABOVE: $quotes = (QUOTES_CATEGORY_NAME !== '') ? " and categories_description.categories_name NOT LIKE '" . QUOTES_CATEGORY_NAME . "' " : ''; FIND: WHERE categories.categories_id = categories_description.categories_id "; REPLACE WITH (notice two lines being replaced by one) WHERE categories.categories_id = categories_description.categories_id " . $quotes; Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
litaliacool Posted November 8, 2009 Share Posted November 8, 2009 Hi Jack I checked my code But it is highly modified in places any idea where i should be looking I’ve been using Beyond compare. Do you think it may be the database sequence as there are lots of mods? I would love to uses this feature on my site and would appreciate any advise you could give me..  Frank Quote Link to comment Share on other sites More sharing options...
litaliacool Posted November 8, 2009 Share Posted November 8, 2009 Hi Jack This is what i get when i log in to quotes....In Categories there is no Quotes categorie..... its all setup in the admin side eg in config also in catalog and i can se the quotes in tools...  I have looked and looked can you please help      Frank Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted November 8, 2009 Author Share Posted November 8, 2009 Hi Jack This is what i get when i log in to quotes....In Categories there is no Quotes categorie..... I don't know how many times you want me to repeat myself but here goes again: There should not be a quotes category showing on the shop side. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
litaliacool Posted November 8, 2009 Share Posted November 8, 2009 I don't know how many times you want me to repeat myself but here goes again: There should not be a quotes category showing on the shop side. 1 How do they get there quote then? 2 How would they make there order shop side if they liked the quote? 3 In admin tools quotes how do i send them the quote when the radio button is ghosted out? 4 Why dose it say status paid? Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted November 8, 2009 Author Share Posted November 8, 2009 1 How do they get there quote then? 2 How would they make there order shop side if they liked the quote? 3 In admin tools quotes how do i send them the quote when the radio button is ghosted out? 4 Why dose it say status paid? 1 - They click on the quotes link in the information box, or wherever you have it and click on the link to view their quotes, if not logged in. Otherwise they are displayed. Â 2 - They add the quote to the cart like a regular product and proceed through checkout. Â 3 - It shouldn't be once the quote (product) is created. Â 4 - I don't undersand this one. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
litaliacool Posted November 9, 2009 Share Posted November 9, 2009 Jack I know you do this for love..And i do love you...But we,ve got issues.... Â 1 When they click on Quotes in the information box shop side, after they log in to collect there quote they get the quotes page as per the screen shot. Â 2 They can not add the quote to the shopping cart like a regular product and proceed through to checkout. because there is no link. They can see it.. But not open it.. nor can they add it to cart( what im saying is the link dose not work).... Â 3 Once i have had a request for a Quote, and created it in Admin/Tools/quotes, by pressing the link to English quotes which takes me to quotes Categories to create a new product, which then i preview, then save, go back to Admin/Tools/quotes, go to press one of the radio button to send client email, But find it shadowed out. Â 4 I have the same problem with my wife...... Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted November 10, 2009 Author Share Posted November 10, 2009 Once the quote is added in the products section, it is a regular product. So, if that product is not showing up on your site, either it is not setup correctly in admin or there is something wrong with the code on the site. I suggest you look closer at the product in admin. Is it enabled? Is the date for when it is active a current date (not expired and not in the future)? Is the quantity at least 1. The same things you would look at for any product. If you can't find a reason, rename the category that you used for the quotes to something else. That will cause the contributions code not to see it and that category should then show up as a regular category. If the product is still not visible, then there is still some mistake in the way it is setup. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Jack_mcs Posted November 11, 2009 Author Share Posted November 11, 2009 If you have Google XML Sitemap SEO installed, in googlesitemap/sitemap.class.php and googlesitemap/sitemap.class_Alternate.php   FIND: function GenerateCategorySitemap(){ $sql = "SELECT categories_id as cID, date_added, last_modified as last_mod FROM " . TABLE_CATEGORIES . " ORDER BY parent_id ASC, sort_order ASC, categories_id ASC";  REPLACE WITH: function GenerateCategorySitemap(){ $quotes = ( defined('QUOTES_CATEGORY_NAME')) ? " cd.categories_name NOT LIKE '" . QUOTES_CATEGORY_NAME . "' " : ''; $sql = "SELECT c.categories_id as cID, c.date_added, c.last_modified as last_mod FROM " . TABLE_CATEGORIES . " c left join " . TABLE_CATEGORIES_DESCRIPTION . " cd on c.categories_id = cd.categories_id where " . $quotes . " ORDER BY c.parent_id ASC, c.sort_order ASC, c.categories_id ASC";  The above should be: function GenerateCategorySitemap(){ $quotes = ( where defined('QUOTES_CATEGORY_NAME')) ? " cd.categories_name NOT LIKE '" . QUOTES_CATEGORY_NAME . "' " : ''; $sql = "SELECT c.categories_id as cID, c.date_added, c.last_modified as last_mod FROM " . TABLE_CATEGORIES . " c left join " . TABLE_CATEGORIES_DESCRIPTION . " cd on c.categories_id = cd.categories_id " . $quotes . " ORDER BY c.parent_id ASC, c.sort_order ASC, c.categories_id ASC"; Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
litaliacool Posted November 11, 2009 Share Posted November 11, 2009 Once the quote is added in the products section, it is a regular product. So, if that product is not showing up on your site, either it is not setup correctly in admin or there is something wrong with the code on the site. I suggest you look closer at the product in admin. Is it enabled? Is the date for when it is active a current date (not expired and not in the future)? Is the quantity at least 1. The same things you would look at for any product. If you can't find a reason, rename the category that you used for the quotes to something else. That will cause the contributions code not to see it and that category should then show up as a regular category. If the product is still not visible, then there is still some mistake in the way it is setup.  Hi Jack  You are right and I was very foolish I had the Products Quantity set to 0  SO I BOW BEFORE YOU  I am going to check the code for the shadowed out radio button ( send client email problem) I get once I have created the product (as per no 3).. Any help on were I should be looking would be greatly appreciated Thanks  Frank Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted November 11, 2009 Author Share Posted November 11, 2009 The code to send the email is in the admin/quotes.php file so I would start there. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
steve*** Posted November 12, 2009 Share Posted November 12, 2009 Jack,  Excellent contribution, only one small error that I can see is... All of the select statements below all says p.customers_email_address when it would be p.quotes_email_address  Other than that, fantastic contrib, keep up the good work.   Steve...  The following changes, as needed, should be made to any shop using this contribution to prevent quotes from showing up where they shouldn't:  In includes/modules/also_purchased_products.php  FIND: $orders_query = tep_db_query("select p.products_id, p.products_image from " . TABLE_ORDERS_PRODUCTS . " opa, " . TABLE_ORDERS_PRODUCTS . " opb, " . TABLE_ORDERS . " o, " . TABLE_PRODUCTS . " p where opa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and opa.orders_id = opb.orders_id and opb.products_id != '" . (int)$HTTP_GET_VARS['products_id'] . "' and opb.products_id = p.products_id and opb.orders_id = o.orders_id and p.products_status = '1' group by p.products_id order by o.date_purchased desc limit " . MAX_DISPLAY_ALSO_PURCHASED); REPLACE WITH: $quotes = (defined('QUOTES_CATEGORY_NAME')) ? " and p.customers_email_address = '' and p.quotes_email_address = '' " : ''; $orders_query = tep_db_query("select p.products_id, p.products_image from " . TABLE_ORDERS_PRODUCTS . " opa, " . TABLE_ORDERS_PRODUCTS . " opb, " . TABLE_ORDERS . " o, " . TABLE_PRODUCTS . " p where opa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and opa.orders_id = opb.orders_id and opb.products_id != '" . (int)$HTTP_GET_VARS['products_id'] . "' and opb.products_id = p.products_id and opb.orders_id = o.orders_id and p.products_status = '1' " . $quotes . " group by p.products_id order by o.date_purchased desc limit " . MAX_DISPLAY_ALSO_PURCHASED);  If you have SiteMap SEO installed, in includes/classes/category_tree.php and includes/classes/category_tree_no_products.php  FIND: $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c left join " . TABLE_CATEGORIES_DESCRIPTION . " cd on c.categories_id = cd.categories_id where cd.language_id = '" . (int)$languages_id . "' order by c.parent_id, c.sort_order, cd.categories_name"); REPLACE WITH: $quotes = (defined('QUOTES_CATEGORY_NAME')) ? " and cd.categories_name NOT LIKE '" . QUOTES_CATEGORY_NAME . "' " : ''; $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c left join " . TABLE_CATEGORIES_DESCRIPTION . " cd on c.categories_id = cd.categories_id " . $quotes . " where cd.language_id = '" . (int)$languages_id . "' order by c.parent_id, c.sort_order, cd.categories_name");  If you have All Products SEO installed, in all-products.php,  FIND: $listing_sql = "select p.products_id, p.products_weight, p.products_quantity, p.products_model, pd.products_name, pd.products_description, p.products_image, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, p.products_date_added, m.manufacturers_name from " . ADD ABOVE: $quotes = (defined('QUOTES_CATEGORY_NAME')) ? " and p.customers_email_address = '' and p.quotes_email_address = '' " : ''; FIND: TABLE_SPECIALS . " s on ( p.products_id = s.products_id ) " . $where . " and pd.language_id = '" . $languages_id . "'"; REPLACE WITH: TABLE_SPECIALS . " s on ( p.products_id = s.products_id ) $where $quotes and pd.language_id = '" . $languages_id . "'";  If you have Google XML Sitemap SEO installed, in googlesitemap/sitemap.class.php and googlesitemap/sitemap.class_Alternate.php  FIND: function GenerateProductSitemap(){ $sql = "SELECT products_id as pID, products_date_added as date_added, products_last_modified as last_mod, products_ordered FROM " . TABLE_PRODUCTS . " WHERE products_status='1' REPLACE WITH: function GenerateProductSitemap(){ $quotes = (defined('QUOTES_CATEGORY_NAME')) ? " and p.customers_email_address = '' and p.quotes_email_address = '' " : ''; $sql = "SELECT products_id as pID, products_date_added as date_added, products_last_modified as last_mod, products_ordered FROM " . TABLE_PRODUCTS . " WHERE products_status='1'" . $quotes . "  FIND: function GenerateCategorySitemap(){ $sql = "SELECT categories_id as cID, date_added, last_modified as last_mod FROM " . TABLE_CATEGORIES . " ORDER BY parent_id ASC, sort_order ASC, categories_id ASC";  REPLACE WITH: function GenerateCategorySitemap(){ $quotes = (defined('QUOTES_CATEGORY_NAME')) ? " cd.categories_name NOT LIKE '" . QUOTES_CATEGORY_NAME . "' " : ''; $sql = "SELECT c.categories_id as cID, c.date_added, c.last_modified as last_mod FROM " . TABLE_CATEGORIES . " c left join " . TABLE_CATEGORIES_DESCRIPTION . " cd on c.categories_id = cd.categories_id where " . $quotes . " ORDER BY c.parent_id ASC, c.sort_order ASC, c.categories_id ASC";  If you have version 2 of Google Feeder installed, in admin/googlefeeder.php,  FIND: define('DEFAULT_LANGUAGE', 1); //Change this to the id of your language. BY default 1 is english ADD BENEATH: define('QUOTES_CATEGORY_NAME','quotes'); //if the Quotes contribution is installed, enter the name of the quotes category here  FIND: $sql = " SELECT concat( '" . $productURL . "' ,products.products_id) AS product_url, ADD ABOVE: $quotes = (defined('QUOTES_CATEGORY_NAME')) ? " and p.customers_email_address = '' and p.quotes_email_address = '' " : ''; FIND: AND categories.categories_id=categories_description.categories_id REPLACE WITH: AND categories.categories_id=categories_description.categories_id " . $quotes . " FIND: $catInfo = " ADD ABOVE: $quotes = (QUOTES_CATEGORY_NAME !== '') ? " and categories_description.categories_name NOT LIKE '" . QUOTES_CATEGORY_NAME . "' " : ''; FIND: WHERE categories.categories_id = categories_description.categories_id "; REPLACE WITH (notice two lines being replaced by one) WHERE categories.categories_id = categories_description.categories_id " . $quotes; Quote Link to comment Share on other sites More sharing options...
steve*** Posted November 12, 2009 Share Posted November 12, 2009  I am going to check the code for the shadowed out radio button ( send client email problem) I get once I have created the product (as per no 3).. Any help on were I should be looking would be greatly appreciated Thanks  Frank  In admin/quotes.php look for two instances of the word disabled (around line 170) and change to enabled  This will allow you to select the 2 ghosted out buttons in the admin page to email the customer.   Steve... Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted November 13, 2009 Author Share Posted November 13, 2009 Excellent contribution, only one small error that I can see is... All of the select statements below all says p.customers_email_address when it would be p.quotes_email_address Thanks for pointing that out. The version before this released version used customers_email_address and it seems I haven't cleared that outof my test shop. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
litaliacool Posted November 13, 2009 Share Posted November 13, 2009 In admin/quotes.php look for two instances of the word disabled (around line 170) and change to enabled  This will allow you to select the 2 ghosted out buttons in the admin page to email the customer.   Steve...  Hi Steve That has worked great with the 2 ghosted out buttons thanks very much.  But its not emailing the customers, I think i may have a problem www\product_info.php i have wishlist installed and meny others..  Originel Quotes php  /*** Begin Quotes ***/ $product_info_query = tep_db_query("select p.products_id, pd.products_name, p.quotes_email_address, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on pd.products_id = p.products_id where p.products_status = '1' and p.products_id = '" . (int)$_GET['products_id'] . "' and pd.language_id = '" . (int)$languages_id . "'"); $product_info = tep_db_fetch_array($product_info_query);  tep_db_query("update " . TABLE_PRODUCTS_DESCRIPTION . " set products_viewed = products_viewed+1 where products_id = '" . (int)$_GET['products_id'] . "' and language_id = '" . (int)$languages_id . "'");  if ($new_price = tep_get_products_special_price($product_info['products_id'])) { $products_price = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>'; } else { $products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])); } /*** End Quotes ***/  My php  $product_info_query = tep_db_query("select p.products_id, pd.products_name, p.quotes_email_address, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on pd.products_id = p.products_id where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); $product_info = tep_db_fetch_array($product_info_query);  tep_db_query("update " . TABLE_PRODUCTS_DESCRIPTION . " set products_viewed = products_viewed+1 where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and language_id = '" . (int)$languages_id . "'");  if ($new_price = tep_get_products_special_price($product_info['products_id'])) { $products_price = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>'; } else { $products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])); }  if (tep_not_null($product_info['products_model'])) { $products_name = $product_info['products_name'] . '<br><span class="smallText">[' . $product_info['products_model'] . ']</span>'; } else { $products_name = $product_info['products_name']; } //DISPLAY PRODUCT WAS ADDED TO WISHLIST IF WISHLIST REDIRECT IS ENABLED  What do you think?   Thank you  Frank Quote Link to comment Share on other sites More sharing options...
johnnybebad Posted November 13, 2009 Share Posted November 13, 2009 Hi Jack I am thinking of installing this module, however I have a concern. Â I think it would be better for the customer to be logged into their account before being able to create a quote. Â as the way i understand it now is the customer sumbits a quote, admin generates the product, the customer creates an account, logs in and views the quotation as a product in qoutes category. Â the customer can be a guest when they submit the quote, they may submit the quote on several sites that sell the same thing, there would be nothing to stopping an admin from one of the other sites armed with the email address to actually check what their competitor quoted the customer by setting up the account using that email address? Â Highly unlikley that this would happen for small day today sales but if at christmas or ordering high value items come into play it could be advantageous to know what a competitor has quoted before putting in your own quote. Â Maybe I am think way ahead of myself but it is a cause for concern. Â Also I guess you can say the product quotation includes delivery and give it a delivery weight of zero, or that its weighted so that on checkout the product gives the correct weight. Â It would be nice to have some screen shots of this mod so that we can tell what we are expecting to see when its installed, both back and front ends. Â Thanks Quote Getting better with mods but no programmer am I. Link to comment Share on other sites More sharing options...
Jack_mcs Posted November 13, 2009 Author Share Posted November 13, 2009 the customer can be a guest when they submit the quote, they may submit the quote on several sites that sell the same thing, there would be nothing to stopping an admin from one of the other sites armed with the email address to actually check what their competitor quoted the customer by setting up the account using that email address? Having the email address will not allow them to login. They also need the password. Also I guess you can say the product quotation includes delivery and give it a delivery weight of zero, or that its weighted so that on checkout the product gives the correct weight. The quote is a product. You set it up as any product so if you want it to have 0 as a weight, you enter 0. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
johnnybebad Posted November 13, 2009 Share Posted November 13, 2009 Having the email address will not allow them to login. They also need the password. The quote is a product. You set it up as any product so if you want it to have 0 as a weight, you enter 0. Â I guess it depends on how soon the customer creates an account after submitting the quote? Â the rest makes perfect sense I am looking at the mod now as I have a heavily modified site I need to be careful, even if I have everything backed up. Â Thanks its a great mod and willbe installing it shortly. Quote Getting better with mods but no programmer am I. Link to comment Share on other sites More sharing options...
steve*** Posted November 14, 2009 Share Posted November 14, 2009 Hi Steve That has worked great with the 2 ghosted out buttons thanks very much.  But its not emailing the customers, I think i may have a problem www\product_info.php i have wishlist installed and meny others..  Originel Quotes php  /*** Begin Quotes ***/ $product_info_query = tep_db_query("select p.products_id, pd.products_name, p.quotes_email_address, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on pd.products_id = p.products_id where p.products_status = '1' and p.products_id = '" . (int)$_GET['products_id'] . "' and pd.language_id = '" . (int)$languages_id . "'"); $product_info = tep_db_fetch_array($product_info_query);  tep_db_query("update " . TABLE_PRODUCTS_DESCRIPTION . " set products_viewed = products_viewed+1 where products_id = '" . (int)$_GET['products_id'] . "' and language_id = '" . (int)$languages_id . "'");  if ($new_price = tep_get_products_special_price($product_info['products_id'])) { $products_price = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>'; } else { $products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])); } /*** End Quotes ***/  My php  $product_info_query = tep_db_query("select p.products_id, pd.products_name, p.quotes_email_address, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on pd.products_id = p.products_id where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); $product_info = tep_db_fetch_array($product_info_query);  tep_db_query("update " . TABLE_PRODUCTS_DESCRIPTION . " set products_viewed = products_viewed+1 where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and language_id = '" . (int)$languages_id . "'");  if ($new_price = tep_get_products_special_price($product_info['products_id'])) { $products_price = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>'; } else { $products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])); }  if (tep_not_null($product_info['products_model'])) { $products_name = $product_info['products_name'] . '<br><span class="smallText">[' . $product_info['products_model'] . ']</span>'; } else { $products_name = $product_info['products_name']; } //DISPLAY PRODUCT WAS ADDED TO WISHLIST IF WISHLIST REDIRECT IS ENABLED  What do you think?   Thank you  Frank  Frank, I don't think that the error is there, although I'm not too hot on code. Do you have a test site I could take a look at?  Steve... Quote Link to comment Share on other sites More sharing options...
steve*** Posted November 14, 2009 Share Posted November 14, 2009 (edited) Jack, Â I've spotted that you need to add " and quotes_email_address NOT LIKE '%@%'" to "\includes\boxes\best_sellers.php" as it's showing my quotes in the best sellers box. Â Â Steve... Edited November 14, 2009 by steve*** Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted November 14, 2009 Author Share Posted November 14, 2009 Jack, Â I've spotted that you need to add " and quotes_email_address NOT LIKE '%@%'" to "\includes\boxes\best_sellers.php" as it's showing my quotes in the best sellers box. Â Â Steve... Thanks for posting that fix. I suggest using this code in case the quotes directory gets deleted for some reason. In includes/boxes/best_sellers.php, find if (isset($current_category_id) && ($current_category_id > 0)) { $best_sellers_query = tep_db_query("select distinct p.products_id, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_status = '1' and p.products_ordered > 0 and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and '" . (int)$current_category_id . "' in (c.categories_id, c.parent_id) order by p.products_ordered desc, pd.products_name limit " . MAX_DISPLAY_BESTSELLERS); } else { $best_sellers_query = tep_db_query("select distinct p.products_id, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_ordered > 0 and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_ordered desc, pd.products_name limit " . MAX_DISPLAY_BESTSELLERS); } and replace it with $quotes = (defined('QUOTES_CATEGORY_NAME')) ? " and p.quotes_email_address = '' " : ''; if (isset($current_category_id) && ($current_category_id > 0)) { $best_sellers_query = tep_db_query("select distinct p.products_id, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_status = '1' and p.products_ordered > 0 and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and '" . (int)$current_category_id . "' in (c.categories_id, c.parent_id) " . $quotes . " order by p.products_ordered desc, pd.products_name limit " . MAX_DISPLAY_BESTSELLERS); } else { $best_sellers_query = tep_db_query("select distinct p.products_id, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_ordered > 0 and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'" . $quotes . " order by p.products_ordered desc, pd.products_name limit " . MAX_DISPLAY_BESTSELLERS); } Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
litaliacool Posted November 14, 2009 Share Posted November 14, 2009 (edited) Frank, I don't think that the error is there, although I'm not too hot on code. Do you have a test site I could take a look at?  Steve...  Steve  Thanks for having a look.... I dont have a test site!!! bit of a sod...  Any ideas would be greatly appreciate....Thats for you as well JACK...  Frank Edited November 14, 2009 by litaliacool Quote Link to comment Share on other sites More sharing options...
litaliacool Posted November 14, 2009 Share Posted November 14, 2009 Frank, I don't think that the error is there, although I'm not too hot on code. Do you have a test site I could take a look at?  Steve...  Steve  Thanks for having a look.... I dont have a test site!!! bit of a sod...  Any ideas would be greatly appreciated....Thats for you as well JACK...  Frank Quote Link to comment Share on other sites More sharing options...
steve*** Posted November 15, 2009 Share Posted November 15, 2009 (edited) Any ideas would be greatly appreciated....  Frank  Frank, The main (and only) part I can see that deals with emails is in admin/quotes.php As that file is copied directly in with no changes there could only really be a couple of potential problems, 1, you've somehow had a corruption on upload/download of that file 2, the email address to send the quote to is store in your mysql database, have you applied the sql statements? Try this sql query and see if it brings back any rows: SELECT * FROM products p where quotes_email_address like '%@%';  if not, it's a sql table problem, go back through and run the sql commands  I assume that your site's emails work for other pages? create account / place orders etc?    Steve... Edited November 15, 2009 by steve*** Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.