Jump to content



Latest News: (loading..)

- - - - -

Contribution: Better Together Promotional Page


  • Please log in to reply
14 replies to this topic

#1   swguy

swguy
  • Members
  • 163 posts
  • Real Name:Scott Wilson
  • Gender:Male
  • Location:Tampa Bay, Florida

Posted 22 August 2009 - 07:28 PM

If you're using Better Together for osCommerce 2.2:

http://addons.oscommerce.com/info/6733

Take a look at the Better Together Promotional Page

http://addons.oscommerce.com/info/6960

It builds a page from all your discounts that's linked from the Information Box.
Contributions: Better Together and Quantity Discounts , for osCommerce 2.2, 2.3.1 and 3.0.  See my profile for more details.

#2   ciscoeuk

ciscoeuk
  • Members
  • 20 posts
  • Real Name:richard armstrong
  • Gender:Male

Posted 13 January 2010 - 12:20 AM

i would like to ask if this add-on can be controlled from the admin side of osc or is that a later version?
All the best
&
Kind Regards

Richard Armstrong AKA Ciscoeuk

all help greatly apprecated

#3   swguy

swguy
  • Members
  • 163 posts
  • Real Name:Scott Wilson
  • Gender:Male
  • Location:Tampa Bay, Florida

Posted 14 January 2010 - 03:00 AM

View Postciscoeuk, on 13 January 2010 - 12:20 AM, said:

i would like to ask if this add-on can be controlled from the admin side of osc or is that a later version?

I have not created an admin panel for Better Together for osCommerce.
Contributions: Better Together and Quantity Discounts , for osCommerce 2.2, 2.3.1 and 3.0.  See my profile for more details.

#4   swguy

swguy
  • Members
  • 163 posts
  • Real Name:Scott Wilson
  • Gender:Male
  • Location:Tampa Bay, Florida

Posted 21 March 2011 - 04:21 AM

The Promotional Page for Better Together is now available for osCommerce 2.3 here:

http://addons.oscommerce.com/info/6960
Contributions: Better Together and Quantity Discounts , for osCommerce 2.2, 2.3.1 and 3.0.  See my profile for more details.

#5   nnclyn

nnclyn
  • Members
  • 265 posts
  • Real Name:Nancy O

Posted 24 May 2011 - 08:31 PM

How would I go about editing the image sizes that appear on this page? I'd like them all a uniform size of 150 x 150

Thanks :)
Nancy

#6   ckpepper02

ckpepper02
  • Members
  • 27 posts
  • Real Name:Chris
  • Gender:Male
  • Location:USA

Posted 10 August 2011 - 06:40 PM

Hi I installed your module, but when I go to activate it in the Admin panel I get

Quote

Warning: include(/catalog/includes/languages/english/modules/order_total/better_together.php) [function.include]: failed to open stream: No such file or directory in /catalog/admin/modules.php on line 129

Warning: include() [function.include]: Failed opening '/catalog/includes/languages/english/modules/order_total/better_together.php' for inclusion (include_path='.:/usr/local/php5/lib/php') in /catalog/admin/modules.php on line 129

Fatal error: Class 'osC_OrderTotal' not found in /catalog/includes/modules/order_total/better_together.php on line 98

I've looked over it a bunch a times and I've installed everything from the package. Is there something I'm doing wrong?

I'm using OSC version 2.3.1

Edited by ckpepper02, 10 August 2011 - 06:41 PM.


#7   ckpepper02

ckpepper02
  • Members
  • 27 posts
  • Real Name:Chris
  • Gender:Male
  • Location:USA

Posted 10 August 2011 - 07:03 PM

Nevermind. I must have downloaded the wrong version somehow. I got the BetterTogether for 2.3.1 and it seems to be working now.

#8   ckpepper02

ckpepper02
  • Members
  • 27 posts
  • Real Name:Chris
  • Gender:Male
  • Location:USA

Posted 11 August 2011 - 04:05 PM

View Postnnclyn, on 24 May 2011 - 08:31 PM, said:

How would I go about editing the image sizes that appear on this page? I'd like them all a uniform size of 150 x 150

Thanks :)

Hi Nancy,

I'm trying to do this too. I've poked around and it looks like I need to edit the catalog/includes/modules/better_together_promo.php file. Looks as if there is a global function called get_products_image that would need to be edited. Can't find where that variable is though.

#9   ckpepper02

ckpepper02
  • Members
  • 27 posts
  • Real Name:Chris
  • Gender:Male
  • Location:USA

Posted 11 August 2011 - 04:52 PM

View Postckpepper02, on 11 August 2011 - 04:05 PM, said:

Hi Nancy,

I'm trying to do this too. I've poked around and it looks like I need to edit the catalog/includes/modules/better_together_promo.php file. Looks as if there is a global function called get_products_image that would need to be edited. Can't find where that variable is though.

FOUND IT!!!

Line 152 of catalog/includes/modules/better_together_promo.php

Change
return tep_image(DIR_WS_IMAGES . $product['products_image'], tep_get_products_name($product_id), $width, $height);

To:
return tep_image(DIR_WS_IMAGES . $product['products_image'], tep_get_products_name($product_id), x, x);

x being the number you want to set it to.

Edited by ckpepper02, 11 August 2011 - 04:53 PM.


#10   cheapo

cheapo
  • Members
  • 25 posts
  • Real Name:Mike G

Posted 27 November 2011 - 05:37 PM

I am installing this on CRELoaded. It works except it has the same cat_to_prod problem that the Zencart version has which prompted version 2.2A.

I looked and can't seem to debug the issue, could you point me to the fix that was made to the zencart version? (I'm hoping I could make a simple fix and have it work in CREloaded.)

Thank you,

Mike

#11   chemist4

chemist4
  • Members
  • 98 posts
  • Real Name:Tim
  • Gender:Male
  • Location:Missouri

Posted 30 November 2011 - 12:13 AM

This may be a stupid question, since no one else has asked, but how do you know which is product 1, product 2, etc.? Is there some way of listing them in the order required for this to work?

#12   Leo2

Leo2
  • Members
  • 41 posts
  • Real Name:Vladimir

Posted 05 April 2013 - 09:40 AM

View Postckpepper02, on 11 August 2011 - 04:52 PM, said:

FOUND IT!!!

Line 152 of catalog/includes/modules/better_together_promo.php

Change
return tep_image(DIR_WS_IMAGES . $product['products_image'], tep_get_products_name($product_id), $width, $height);

To:
return tep_image(DIR_WS_IMAGES . $product['products_image'], tep_get_products_name($product_id), x, x);

x being the number you want to set it to.

This work for product images. What to change to reduce the categories images as well?

Also, where to change text style for the page?

Edited by Leo2, 05 April 2013 - 09:41 AM.


#13   swguy

swguy
  • Members
  • 163 posts
  • Real Name:Scott Wilson
  • Gender:Male
  • Location:Tampa Bay, Florida

Posted 14 April 2013 - 01:03 PM

View Postchemist4, on 30 November 2011 - 12:13 AM, said:

This may be a stupid question, since no one else has asked, but how do you know which is product 1, product 2, etc.? Is there some way of listing them in the order required for this to work?

If your Better Together discount works, then the discount will be shown on the promotional page.  If you have a question about Better Together for osCommerce, please post it to the support thread here: http://forums.oscommerce.com/index.php?showtopic=335710
Contributions: Better Together and Quantity Discounts , for osCommerce 2.2, 2.3.1 and 3.0.  See my profile for more details.

#14   swguy

swguy
  • Members
  • 163 posts
  • Real Name:Scott Wilson
  • Gender:Male
  • Location:Tampa Bay, Florida

Posted 14 April 2013 - 01:07 PM

View PostLeo2, on 05 April 2013 - 09:40 AM, said:

This work for product images. What to change to reduce the categories images as well?

Also, where to change text style for the page?

There is currently no class or id for the text.  If you want to set one, modify ./catalog/better_together_promo.php and change where the data is written out, i.e. change

echo '<tr><td>'.$marketing_data[$i]['data'] . "<br />";

to

echo '<tr><td><span class="your_class"'.$marketing_data[$i]['data'] . "</span><br />";

For the  category images, in   ./catalog/includes/modules/better_together_promo.php you need to change  the calls to tep_image which use get_categories_image() to include the length and width.  I should have done it the same way I did products and then you'd only have to make one change.

Edited by swguy, 14 April 2013 - 01:17 PM.

Contributions: Better Together and Quantity Discounts , for osCommerce 2.2, 2.3.1 and 3.0.  See my profile for more details.

#15   Leo2

Leo2
  • Members
  • 41 posts
  • Real Name:Vladimir

Posted 15 April 2013 - 01:25 PM

Thank you, style class works, but is it possible to have special class for the discount number? Now I can apply the style only to the whole text.

View Postswguy, on 14 April 2013 - 01:07 PM, said:

For the  category images, in   ./catalog/includes/modules/better_together_promo.php you need to change  the calls to tep_image which use get_categories_image() to include the length and width.  I should have done it the same way I did products and then you'd only have to make one change.

That doesn't work for me. I have the following function there
function get_categories_image($category_id) {
global $languages_id;
$category_query = tep_db_query("select cd.categories_name, c.categories_image from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . (int)$category_id . "' and cd.categories_id = '" . (int)$category_id . "' and cd.language_id = '" . (int)$languages_id . "'");
$category = tep_db_fetch_array($category_query);
return tep_image(DIR_WS_IMAGES . $category['categories_image'], $category['categories_name'], 80, 80);
// return $category['categories_image'];
}
and it doesn't find any images. I have OnTheFly Thumbnails mod installed too, and it puts "no image" picture with it initial 200*200 size to all the categories pictures, and the size is not changed by the parameters in the   return tep_image(DIR_WS_IMAGES . $category['categories_image'], $category['categories_name'], 80, 80).

If I use second (commented now) 'return' call, I get the categories pictures with no scaling.

Edited by Leo2, 15 April 2013 - 01:28 PM.