Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 03-21-2017 09:49:27

coatzel21
Member
From: Boston
Registered: 03-04-2014
Posts: 150
Website

Two updates

Just recently updated our skins and had to change a few things around. Wondering if you can help me out with a few updates?

First, in the ajax minicart display how can I add the product number as well as the display name so it reads [ 'prodnum', 'displayname']

Second, how can I make a mass update to set the Product Sort/Search Price* === Regular price ?



Thanks!

Last edited by coatzel21 (03-21-2017 09:53:14)

Offline

 

#2 03-22-2017 09:31:00

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Two updates

(1) Edit {private}/apps/ecom/ECOM/includes/skinwidget_minicart.php.  Search for name display, mod as needed.

(2) Edit the prodsearchp() function in {private}/apps/ecom/ECOM_Prod/ECOM_Prod.php.  Search for 'sortprice' change to 'regprice'.


Nick Hendler

Offline

 

#3 03-27-2017 10:35:39

coatzel21
Member
From: Boston
Registered: 03-04-2014
Posts: 150
Website

Re: Two updates

Opps sorry on part 1 I meant the minisearch not the mini cart.

On part 2 I made the neccesary changes but my price filtering seems to be numerical rather than by price for instance price down will yield
$950, $907, $90, $880, $80, $750. How can I resolve this?

Offline

 

#4 03-27-2017 11:09:08

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Two updates

(1) Edit {private}/apps/ecom/ECOM/includes/prodsearchajax.php.

(2) Interesting.  That's why we use sortprice, as it's an integer.  regprice is a varchar, so it makes sense it's sorting that way.  I guess you have two options here:

A. Change the code back then execute this SQL to make sortprice=regprice:

UPDATE ecom_prod SET sortprice=regprice

~OR~

B. Alter the regprice column so that it's a FLOAT instead of a VARCHAR.  I have no idea if this is going to cause issues elsewhere.  It shouldn't, but this has never been tested, do at your own risk.


Nick Hendler

Offline

 

#5 03-27-2017 12:00:00

coatzel21
Member
From: Boston
Registered: 03-04-2014
Posts: 150
Website

Re: Two updates

I'll take option A for 1,000 Alex.

worked like a charm, thanks.

Offline

 

#6 03-27-2017 12:49:50

coatzel21
Member
From: Boston
Registered: 03-04-2014
Posts: 150
Website

Re: Two updates

What would the global call to Product Number be?

Code:

foreach ($ajaxprodsearch as $num => $data) {
 
     $link  = $this->link_namespace('ecom','prodshow',array('ref'=>$data['id']),$data['seourl']);
     $name  = $this->xhtml_encode($data['name']);
 
     $count++;

//

               print '<a href="' . $link . '" title="' . $name . '">';
               print '<img src="media/ecom/prodsm/' . $imgname . '" alt="' . $name . '" width="' . $imgwidth . '" /></a>';

Offline

 

#7 03-28-2017 07:33:36

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Two updates

Should be in $data['prodnum'].  print_r($data) will tell you what's in the array.


Nick Hendler

Offline

 

Board footer