Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Contribution: Better Together Promotional Page


swguy

Recommended Posts

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.3.x and Phoenix. See my profile for more details.

Link to comment
Share on other sites

  • 4 months later...

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.3.x and Phoenix. See my profile for more details.

Link to comment
Share on other sites

  • 1 year later...
  • 2 months later...

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

Link to comment
Share on other sites

  • 2 months later...

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
Link to comment
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.

Link to comment
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
Link to comment
Share on other sites

  • 3 months later...

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

Link to comment
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?

Link to comment
Share on other sites

  • 1 year later...

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
Link to comment
Share on other sites

  • 2 weeks later...

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://www.oscommerce.com/forums/index.php?showtopic=335710

Contributions: Better Together and Quantity Discounts for osCommerce 2.3.x and Phoenix. See my profile for more details.

Link to comment
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

Contributions: Better Together and Quantity Discounts for osCommerce 2.3.x and Phoenix. See my profile for more details.

Link to comment
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
Link to comment
Share on other sites

  • 5 months later...

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

Link to comment
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.

Contributions: Better Together and Quantity Discounts for osCommerce 2.3.x and Phoenix. See my profile for more details.

Link to comment
Share on other sites

  • 6 years later...

@swguy

Excellent and thank you!

CE PHOENIX SUPPORTER

Support the Project, go PRO and get access to certified add ons

Full-time I am a C-suite executive of a large retail company in Australia. In my spare time, I enjoying learning about web-design.

Download the latest version of CE Phoenix from gitHub here

Link to comment
Share on other sites

@swguy

Scott,

Just a note to say thank you. These modules work perfectly and I have them running in my live shop.

Peter

CE PHOENIX SUPPORTER

Support the Project, go PRO and get access to certified add ons

Full-time I am a C-suite executive of a large retail company in Australia. In my spare time, I enjoying learning about web-design.

Download the latest version of CE Phoenix from gitHub here

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