swguy

Contribution: Better Together Promotional Page

18 posts in this topic

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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 :)

Share this post


Link to post
Share on other sites

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

 

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

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

Share this post


Link to post
Share on other sites

Hi,

 

I have installed module Better Together and Better Together Promo in osc 2.3.3.4.

Everything working ok, except, on promo page, only first discount is shown.

for example if I have this :

 

$this->add_prod_to_prod(26, 27, "%", 100);

$this->add_prod_to_prod(83, 15, "%", 50);

 

then I see on promo page only discount of 100%

 

it doesn't show product 83 with 50% discount.Same with all combinations of examples provided in ot_better_together.php.

 

thank you

 

rgd,

Goxy

Share this post


Link to post
Share on other sites

Those examples are just examples. You will need to adjust them to actual product and category ids which exist in your store. I just tested with a fresh 2.3.3.4 download and it works fine as long as the items being discounted actually exist.

Share this post


Link to post
Share on other sites

Thank you Scott,

 

I have messed up with file btter_together_promo.php in modules folder and again uploaded same instead of original one.

 

cheers

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now