Forum Replies Created
-
AuthorPosts
-
MaryMember
Thank you so much! I’ll give it a try!
MaryMemberHoly cow, Amin007, you are the best! Really! I mean, I’m moving my shop over from the Wp e-Commerce plugin beca I was havig so much trouble with it and you guys have all been great, and very patient – especially with my ‘duh’ questions. Thank you so much!
MaryMemberHi Amin007,
Me again!
I just tried it with the ajax version and it’s working! Yeah!
Once again, thank you!
-Mary
MaryMemberHi Amin007,
I’m using the normal one.
-Mary
MaryMemberAmin007,
That worked! You have helped me so many times! Thank you!
-Mary
December 10, 2010 at 2:04 pm in reply to: How to display limited number of products within category #27245MaryMemberAlso, I was also able to remove the pagination by deleting the following lines from my new function, show_wp_eStore_category_limitp_fancy, in the file shortcode_include.php:
//Number of pages setup
if ($totalrows > $limit)
{
$pages = ceil($totalrows / $limit)+1;
$separator=’?’;
$url=get_permalink();
if(strpos($url,’?product_page=’))
{
$separator=’?’;
}
else if(strpos($url,’?’)!==false)
{
$separator=’&’;
}
$output .= ‘<div class=”product_page”>’;
for($r = 1;$r<$pages;$r++)
{
$output .= ‘‘.$r.’ ‘;
//$output .= ““.$r.” “;
if ($r%15==0)
$output .= ‘
‘;
}
Wooooo Hoooo!!!
Thnks again!
-Mary
December 10, 2010 at 1:42 pm in reply to: How to display limited number of products within category #27244MaryMemberHoly Cow, Amin007, I did it!
You’re talking to someone who is NOT a programmer! I mean, really NOT. But, I was able to edit both the shortcode_include.php and eStore-extra-shortcodes.php to create a new shortcode that does exactly what I want!!!! I’m doing the happy dance!
In case anyone else is looking to do this, here’s what I did:
In the shortcode_include.php file, I copied the function called show_wp_eStore_category_products_fancy
and then changed the following beginning lines of the copied function from:
function show_wp_eStore_category_products_fancy($id,$style=3,$order=1)
{
if($id==’no id’)
{
return “You did not specify a category ID. Please enter a category ID with this shortcode”;
}
$i = 0;
//set pages to include $limit records per page
$limit = get_option(‘eStore_products_per_page’);
if(empty($limit))
$limit = 25;
if (isset($_GET))
{
$page = $_GET;
}
else
{
$page = 1;
to:
function show_wp_eStore_category_limitp_fancy($limit,$id,$style=3,$order=1)
{
if($id==’no id’)
{
return “You did not specify a category ID. Please enter a category ID with this shortcode”;
}
$i = 0;
if($limit==’no limit’)
$limit = 25;
if (isset($_GET))
{
$page = $_GET;
}
else
{
$page = 1;
}
And, then, in the file titled eStore-extra-shortcodes.php, I inserted a line in the ‘add shortcode’ section towards the top:
add_shortcode(‘wp_eStore_fancy1_no_price’, ‘eStore_fancy1_no_price’);
add_shortcode(‘wp_eStore_latest_products’, ‘wp_eStore_latest_products_handler’);
add_shortcode(‘wp_eStore_category_products_fancy’, ‘wp_eStore_category_products_fancy_handler’);
//MEK added this function
add_shortcode(‘wp_eStore_category_limitp_fancy’, ‘wp_eStore_category_limitp_fancy_handler’);
add_shortcode(‘wp_eStore_display_compact_cart’, ‘wp_eStore_display_compact_cart_handler’);
add_shortcode(‘wp_eStore_fancy1_video_thumbnail’, ‘wp_eStore_fancy1_video_thumbnail_handler’);
add_shortcode(‘wp_eStore_free_download_ajax_fancy’,’wp_eStore_free_download_ajax_fancy_handler’);
And then, in this same file, I copied the following lines:
function wp_eStore_category_products_fancy_handler($atts){
extract(shortcode_atts(array(
‘id’ => ‘no id’,
‘style’ => ‘1’,
‘order’ => ‘1’,
), $atts));
return show_wp_eStore_category_products_fancy($id,$style,$order);
}
and edited the copied lines to be:
//MEK added this function
function wp_eStore_category_limitp_fancy_handler($atts){
extract(shortcode_atts(array(
‘limit’ => ‘no limit’,
‘id’ => ‘no id’,
‘style’ => ‘1’,
‘order’ => ‘1’,
), $atts));
return show_wp_eStore_category_limitp_fancy($limit,$id,$style,$order);
}
and, now I have the shortcode:
[wp_eStore_category_limitp_fancy limit=3 id=1 style=3 order=1]
that limits the number of products within a category shown to 3 (or whatever).
How cool is that!
Thanks for all of your help, Amin007!
-Mary
December 10, 2010 at 2:11 am in reply to: How to display limited number of products within category #27242MaryMemberHi Amin007,
Thank you for the reply!
Unfortunately this solution doesn’t work for me because there are other categories of products where I want to show more than 3 products. The situation where I want to show only 3 products is just for a certain category.
Any other thoughts? Maybe this is a crazy idea, but is there a way that I can change the wp_eStore_category_products_fancy function to include the number modifier?
Thanks again!
-Mary
December 6, 2010 at 1:24 pm in reply to: Lightbox and Multiple Images (Want to use an image set) #27068MaryMemberThank you so much! It’s working perfectly! Just how I wanted it!
You’re the best!
Thanks again!
-Mary
December 5, 2010 at 1:29 pm in reply to: Lightbox and Multiple Images (Want to use an image set) #27066MaryMemberHi amin007,
Thank you so much for the reply.
Unfortunately, it didn’t work for me. Now, when I click on the thumbnail, the first image opens in the lightbox, but only the first image. There is no ‘image 1 of 12’ or anything like that and there is no ‘Next’ or ‘Previous’ buttons anywhere. So, there’s no way to see the additional images for the product.
Maybe this is a stupid observation, but I noticed this when I tried my own programming too. The changes in programming done on the eStore_button_display_helper.php file seem to have absolutely no effect on anything. The coding that you gave me above (and that I used) is alot like the coding that I tried to use – you’re adding the image set option (or group I guess in my case) to the ‘rel=”lightbox”‘ coding. But, as with my coding, I don’t see any change in the resulting HTML coding for the page. The html for the page still just shows ‘rel=”lightbox”‘ with no modifier. Maybe that doesn’t help, but I thought that I would mention it.
If it helps, here’s a link to my product page:
http://scrappydigits.com/products-page/
Thanks again for all of your help!
-Mary
December 4, 2010 at 6:57 pm in reply to: Lightbox and Multiple Images (Want to use an image set) #27064MaryMemberHi, it’s me again.
I think I know, at least in theory, how to solve my problem here, but I don’t know how to implement it. I’m don’t know php at all, so I’m hoping someone can help me with that part…
The change that I think I need is to add a modifier in brackets to the rel=”lightbox” part of the programming. So, all of the images that belong to product #1 would all have the same modifier added to this programing (i.e. rel=”lightbox[product1]”) and all the images for the second product would have a different modifier added to them (i.e. rel=”lightbox[product2]”).
So, I can’t seem to figure out how to implement this in the programing. Again, I know nothing about php. But , this is what I’ve tried and it didn’t work. I tried to change the programming to add the product name in brackets to the rel=”lightbox” line. I did this by editing the ‘eStore_button_display_helper.php’ file. Here are the before and after lines of code, starting at line 17:
Before:
else
{
$output .= ‘<div class=”eStore-thumbnail”>’;
$output .= ‘</div>’;
if(!empty($ret_product->additional_images))
{
$product_images = explode(‘,’,$ret_product->additional_images);
foreach ($product_images as $image)
{
$output .= ‘name.'”>‘;
}
}
}
After:
else
{
$output .= ‘<div class=”eStore-thumbnail”>’;
$output .= ‘</div>’;
if(!empty($ret_product->additional_images))
{
$product_images = explode(‘,’,$ret_product->additional_images);
foreach ($product_images as $image)
{
$output .= ‘name.’]” title=”‘.$ret_product->name.'”>‘;
}
}
}
So, basically I changed rel=”lightbox” to rel=”lightbox”
But, no change iin the way the lightbox is working. Any thoughts?
Thanks again-
-Mary
-
AuthorPosts