Forum Replies Created
-
AuthorPosts
-
December 25, 2010 at 4:03 am in reply to: Lightbox and Multiple Images (Want to use an image set) #27069
marizs23
MemberThe lightbox2 plugin needs a slight tweak to work with ssl/https. In lightbox2.php, I changed WP_PLUGIN_URL to plugins_url() on line 23. Without the change, it hardcoded all of its scripts and stylesheets with http://, causing a partial encryption error. It works great now.
marizs23
MemberNo errors here. It seems to work fine, as I have tested it many times. Thanks.
marizs23
MemberI now added code so that when a customer tries to add 10 products, while there are only 7 in stock, 7 will be added instead of the default 1. I made the change on line 409 of wp_eStore1.php
//$_POST = 1; //Add one by default
global$wpdb;
$products_table_name = WP_ESTORE_PRODUCTS_TABLE_NAME;
$id = $_POST;
$retrieved_product = $wpdb->get_row("SELECT * FROM $products_table_name WHERE id = '$id'", OBJECT);
$_POST = $retrieved_product->available_copies;
This does not interfere with the customer being notified of the quantity limit.
marizs23
MemberOkay, I made some code to check the quantities of the shopping cart before sending it to paypal. I realized that if somebody takes too long on paypal, their session will expire. But if somebody puts something into the shopping cart, it could sit there a very long time, giving it a better chance to run out of stock by the time they make up their mind and purchase. My problem isnt that I am selling too quickly, but just that I never have alot of my items in stock because they are handmade.
My code is a little rusty as I have not written any wordpress plugins or firefox extensions for a couple of years now. But here is a link to the modified page to catch the error. http://host4.network-device.net/share/eStore_payment_submission.txt Changes started at line 145. To test it out, just add some items to your cart. While the items are in the cart, go to manage products page and reduce the quantity to a number less than is in your cart. Hit paypal button.
marizs23
MemberI tweaked the extra shortcodes plugin to allow me to order my products list by inventory quantity. I added the following code at line 474 of shortcode_include.php:
` else if($order==5)
{
$wp_eStore_db = $wpdb->get_results("SELECT * FROM $cat_prod_rel_table_name INNER JOIN $products_table_name ON $cat_prod_rel_table_name.prod_id=$products_table_name.id where cat_id=$id ORDER BY available_copies LIMIT $start, $limit", OBJECT);
}
else if($order==6)
{
$wp_eStore_db = $wpdb->get_results("SELECT * FROM $cat_prod_rel_table_name INNER JOIN $products_table_name ON $cat_prod_rel_table_name.prod_id=$products_table_name.id where cat_id=$id ORDER BY available_copies DESC LIMIT $start, $limit", OBJECT);
}
@JackAubrey you could probably just replace the word “available_copies” with “price” so that you can put your more expensive items first, or lastmarizs23
MemberGot it. Thank you very much. Which of the plugin’s files contains the shortcodes?
marizs23
MemberThanks for the quick response. When you fixed the out of stock issue, when does that plugin file become available?
edit: I found the answer at https://support.tipsandtricks-hq.com/automatic-update-request
marizs23
MemberThat will be a nice feature. Which .php file do you put the shortcodes in? I would like the tweak the plugin a little and make my own shortcodes.
-
AuthorPosts