Jump to content
Jack_mcs

Daily Specials

Recommended Posts

Looking forward to that. I personally think this is a great contribution and need to keep it alive and keep improving.

Edited by ptt81

Share this post


Link to post
Share on other sites

This is one I use personally so it will get updated more often. Input from users helps me see things I may not otherwise think about though so I appreicate any suggestions.

Share this post


Link to post
Share on other sites

Hi

 

Just installed but when I pick on any of the categories or pages in the bottom right corner, I get a yellow triangle (MSIE 7) and when clicking on it the error is

 

Line 32

char 1

id is undefined

admin/daily_specials.php

 

function ClearSelections(idname) {

alert(id); *** This is line 32 when view source ***

 var list = document.daily_special_home.idname;
 if (list.selectedIndex == 0) {
   list.selectedIndex = 0;
 }  
}

 

I'm on PHP 5 if that makes a difference

 

Cheers

 

Ian

 

Edit: Just renamed alert(id) to alert(idname) and a "testing??" alert came up. Commented the line out and now get a different yellow triangle message

 

Line 34

char 3

selectedindex is null or not an object

admin/daily_specials.php

 

Same function but this time

 

  if (list.selectedIndex == 0) {

 

Ian

Edited by ianric

Share this post


Link to post
Share on other sites

Hi

 

Just installed but when I pick on any of the categories or pages in the bottom right corner, I get a yellow triangle (MSIE 7) and when clicking on it the error is

First, the alert(id) line shouldn't be in there at all. It won't hurt anything but it is for testing and should be removed for normal use. As far as the error is concerned, are you saying that if you just go into the daily specials page and click once on a category an error appears?

Share this post


Link to post
Share on other sites

First, the alert(id) line shouldn't be in there at all. It won't hurt anything but it is for testing and should be removed for normal use. As far as the error is concerned, are you saying that if you just go into the daily specials page and click once on a category an error appears?

Hi Jack

 

Yep, as soon as I pick a category or page, the error shows up. No visible errors in Firefox but a few in the error console.

 

Just PM'd you a link to a pic

 

 

Cheers

 

Ian

Share this post


Link to post
Share on other sites

Yep, as soon as I pick a category or page, the error shows up. No visible errors in Firefox but a few in the error console.

I'm confused. I thought you were referring to the category box in the admin->Daily Specials section but the error you sent shows the error on the shop side. I must not be understanding the problem.

Share this post


Link to post
Share on other sites

I'm confused. I thought you were referring to the category box in the admin->Daily Specials section but the error you sent shows the error on the shop side. I must not be understanding the problem.

Sorry for the confusion. The error shows in admin->daily_specials.php ONLY when I pick on a category or page and I *think* this is causing the errors shop side. In Firefox, nothing happened when I clicked on the banner and that's when I found the error console with all the errors.

 

This is the error admin side in IE

 

Line 34

char 3

SelectedIndex is null or not an object

admin/daily_specials.php

 

View source and line 34 is

 

if (list.selectedIndex == 0) {

 

I'm at the office now so not got access to Firefox or my store site but did some more testing last night and I still get the error admin side but the shop side seems to work in IE.

 

Now, I have another problem. The main shopping cart shows the discount incorrectly. The shopping cart box is correct.

 

I've created a daily special called 80s dance

condition 1 - cart total

condition 2 - greater than

condition 3 - 10%

categories - 80s dance (get a yellow triangle error)

pages - select to clear

 

main shopping cart

subtotal - £11.30

80s dance -£1.00 (should be £1.13)

total - £10.17

 

shopping cart box

subtotal - £11.30

80s dance -£1.13

total - £10.17

 

Also, what does the daily specials info box do? I was expecting a list similar to the stock specials but I read that it has nothing to do with that.

 

Hope this is understandable

 

Ian

Share this post


Link to post
Share on other sites

This is the error admin side in IE

 

Line 34

char 3

SelectedIndex is null or not an object

admin/daily_specials.php

 

The categories box in admin is just a static box. The code doesn't do anything when it is clicked on. It is only when update is clicked that that box comes into play. So there is something else going on there that I won't be able to help with since I've no way to duplicate it.

 

Now, I have another problem. The main shopping cart shows the discount incorrectly. The shopping cart box is correct.

 

The code that calculates this is the same so I don't see how this is possible. If already had Easy Discount installed, the code in this contribution is a little different from the orignial so be sure you upload all files.

Also, what does the daily specials info box do? I was expecting a list similar to the stock specials but I read that it has nothing to do with that.

It displays the popup text of an active special. If there is more than one active one, it randomly loads them. A link will also be shown in the box that goes to the daily special page.

Share this post


Link to post
Share on other sites

Hi Jack, I was wondering if your contribution supports product attributes and taken into account the Separate Pricing Per Customer (SPPC) or customer group pricing contribution? Or is it just an interface on top of the default Specials? I'm still unclear of how this actually works since i was waiting for a better version to be released before installing, my shop is heavily modified I don't want to have to dig thru codes to upgrade to new version later on.

Share this post


Link to post
Share on other sites

The categories box in admin is just a static box. The code doesn't do anything when it is clicked on. It is only when update is clicked that that box comes into play. So there is something else going on there that I won't be able to help with since I've no way to duplicate it.The code that calculates this is the same so I don't see how this is possible. If already had Easy Discount installed, the code in this contribution is a little different from the orignial so be sure you upload all files.

It displays the popup text of an active special. If there is more than one active one, it randomly loads them. A link will also be shown in the box that goes to the daily special page.

Hi Jack, Thanks for the answers

 

Been testing it some more today and I couldn't get it to fail apart from the admin side so I'm happy again. I do have KGT discount installed so there could be a conflict.

 

 

Cheers

 

Ian

Share this post


Link to post
Share on other sites

Hi Jack, I was wondering if your contribution supports product attributes and taken into account the Separate Pricing Per Customer (SPPC) or customer group pricing contribution? Or is it just an interface on top of the default Specials? I'm still unclear of how this actually works since i was waiting for a better version to be released before installing, my shop is heavily modified I don't want to have to dig thru codes to upgrade to new version later on.

I'm not sure what you mean by "supports product attributes." It applies the discount to however the settings are set in admin. Nothing is in the code for SPPC. The code will apply the special to whatever is in the shopping cart that fits the settings for that special. If you want it to apply to only certain groups, it won't do it.

Share this post


Link to post
Share on other sites

Hi, I wouldnt have a clue how to install this. Can someone either guide me through it, or give me a price to install this?

Thanks

 

Cameron Lett

www.hasaudio.co.nz

Share this post


Link to post
Share on other sites

Hi, I wouldnt have a clue how to install this. Can someone either guide me through it, or give me a price to install this?

It comes with instructions. Did you try those?

Share this post


Link to post
Share on other sites

It comes with instructions. Did you try those?

 

I tried, but as I said, I dont know how to install these addons. Where is the database? What file goes where? What changes need to be made? I can adjust php files, easy enough, but i dont know how to use myphpadmin....

Share this post


Link to post
Share on other sites

Walking you through how to install a contribution isn't something to be covered in a support thread like this. You'll need to post in the general support thread for help with that. Or, you can use google (always the best thing to do before posting here) and read what others have said since this is a common issue. See here.

Share this post


Link to post
Share on other sites

Okay I seem to be getting this message in my admin:

 

Fatal error: Cannot redeclare do_magic_quotes_gpc() (previously declared in /home/hasaudio/public_html/admin/includes/functions/compatibility.php:18) in /home/hasaudio/public_html/admin/includes/functions/compatibility.php on line 30

 

Any Ideas?

Share this post


Link to post
Share on other sites

This doesnt look good!

 

Warning: require(includes/classes/navigation_history.php) [function.require]: failed to open stream: No such file or directory in /home/hasaudio/public_html/admin/includes/application_top.php on line 136

 

Warning: require(includes/classes/navigation_history.php) [function.require]: failed to open stream: No such file or directory in /home/hasaudio/public_html/admin/includes/application_top.php on line 136

 

Fatal error: require() [function.require]: Failed opening required 'includes/classes/navigation_history.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/hasaudio/public_html/admin/includes/application_top.php on line 136

Share this post


Link to post
Share on other sites

Those errors don't have anything to do with this contribution. My guess is that you overwrote or deleted something that shouldn't have been overwritten or deleted. For the magic quotes problems, you can look through these posts to get an idea of what is wrong. But the easiest solution would be to restore everything to get the shop working and then try again.

Share this post


Link to post
Share on other sites

A new version has been uploaded with these changes:

 

- Added instructions for STS

- Added spacing between the specials on the daily_specials.php page

- Changed code for upcoming specials on the daily_specials.php page to show only future specials

- Changed so that default language of All is selected with a new special

- Changed code so that a new special is automatically selected

- Improved cron script

- Fixed coding error with version checking code

- Fixed admin/daily_specials.php where it would fail if an apostrophe was used for the popup text

- Fixed coding mistake in incldues/classes/easy_discount.php regarding rounding

- Fixed problem that would corrupt a special when the language was changed

Share this post


Link to post
Share on other sites

A new version has been uploaded with these changes:

 

- Added instructions for STS

- Added spacing between the specials on the daily_specials.php page

- Changed code for upcoming specials on the daily_specials.php page to show only future specials

- Changed so that default language of All is selected with a new special

- Changed code so that a new special is automatically selected

- Improved cron script

- Fixed coding error with version checking code

- Fixed admin/daily_specials.php where it would fail if an apostrophe was used for the popup text

- Fixed coding mistake in incldues/classes/easy_discount.php regarding rounding

- Fixed problem that would corrupt a special when the language was changed

 

Hi Jack and thanks for this update.

 

Unfortunately, on my Admin side, the Category Tree don't show up. The only thing i see is "Select to Clear"!

here is the function from admin/daily_specials.php

 

<?php
          $categories_array = array();
          $categories_array[] = array('id' => TEXT_SELECT_ALL, 'text' => TEXT_SELECT_ALL);
          $categories_array = tep_get_category_tree('','','',$categories_array);

          $cats = explode(",", $ds['categories']);
          $selectedCats = array();    
          $pos = 0; 
          for ($c = 0; $c < count($categories_array); ++$c)
          {
             if (in_array($categories_array[$c]['id'], $cats))
             {
                $selectedCats[$pos] = array('id' => $categories_array[$c]['id'], 'text' => $categories_array[$c]['text']);
                $pos++;
             }  
          }
          if (empty($selectedCats)) //force the first selection if empty
            $selectedCats[0] = array('id' => $categories_array[0]['id'], 'text' => $categories_array[0]['text']);

          $pages_array = GetDSFilesList($language);
          $pages = explode(",", $ds['pages']);
          $selectedPages = array();    
          $pos = 0; 
          for ($c = 0; $c < count($pages_array); ++$c)
          {
             if (in_array($pages_array[$c]['id'], $pages))
             {
                $selectedPages[$pos] = array('id' => $pages_array[$c]['id'], 'text' => $pages_array[$c]['text']);
                $pos++;
             }  
          }
        ?> 

 

 

Any Suggestions?

Thank you!

Share this post


Link to post
Share on other sites

The category code is the same as used in a standard shop. If you can go to admin->Catalog and see the categories list where it says Go To: (upper right), then the basic code is working and something is wrong in your installation of this contribution. Otherwise, there is something wrong with your shops code.

Share this post


Link to post
Share on other sites

The category code is the same as used in a standard shop. If you can go to admin->Catalog and see the categories list where it says Go To: (upper right), then the basic code is working and something is wrong in your installation of this contribution. Otherwise, there is something wrong with your shops code.

 

Sorry my fault! :-"

 

I've changed the original "tep_get_category_tree" function for an other contrib.

 

Thanks

Share this post


Link to post
Share on other sites

Sorry, got another problem.

 

The easy discount don't show up in:


  •  
  • boxes/shopping_cart.php
  • in specials.php
  • in shopping_cart.php
  • as ot at checkout

 

it seems that the discount will not be applied. I went through the manual 5 times or more, everything is perfectly installed.

I've everything tested, test Mode or not, Example of Image special, Example of text special and my own created.

 

What can i do to test if the easy discount is applied or not?

 

Thanks very much

Harry

Share this post


Link to post
Share on other sites

The easy discount don't show up in:


  •  
  • boxes/shopping_cart.php
  • in specials.php
  • in shopping_cart.php
  • as ot at checkout

 

it seems that the discount will not be applied. I went through the manual 5 times or more, everything is perfectly installed.

I've everything tested, test Mode or not, Example of Image special, Example of text special and my own created.

 

What can i do to test if the easy discount is applied or not?

Did you install the Easy Discount module in admin->Modules->Order Total?

Share this post


Link to post
Share on other sites

Did you install the Easy Discount module in admin->Modules->Order Total?

 

Yes, i did everything from the manual! I don't have any clue :blink:

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

×